Title: [230108] trunk/Source/WebKit
Revision
230108
Author
[email protected]
Date
2018-03-30 10:30:18 -0700 (Fri, 30 Mar 2018)

Log Message

Update messages.py codegen for String, fix tests
https://bugs.webkit.org/show_bug.cgi?id=184179
<rdar://problem/39041352>

Reviewed by Mark Lam.

I updated some of the code in
https://trac.webkit.org/changeset/230097 and auto-magically used a
script to update copyright headers... and that broke the tests
which checked for a particular date. Update all of the headers.

Part of this change updates the code generated by messages.py

* Scripts/webkit/LegacyMessageReceiver-expected.cpp:
* Scripts/webkit/MessageReceiver-expected.cpp:
* Scripts/webkit/MessageReceiverSuperclass-expected.cpp:
* Scripts/webkit/MessagesSuperclass-expected.h:
* Scripts/webkit/messages.py:
* Scripts/webkit/messages_unittest.py:
(GeneratedFileContentsTest.assertGeneratedFileContentsEqual):
generate a better error message

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (230107 => 230108)


--- trunk/Source/WebKit/ChangeLog	2018-03-30 16:55:12 UTC (rev 230107)
+++ trunk/Source/WebKit/ChangeLog	2018-03-30 17:30:18 UTC (rev 230108)
@@ -1,3 +1,27 @@
+2018-03-30  JF Bastien  <[email protected]>
+
+        Update messages.py codegen for String, fix tests
+        https://bugs.webkit.org/show_bug.cgi?id=184179
+        <rdar://problem/39041352>
+
+        Reviewed by Mark Lam.
+
+        I updated some of the code in
+        https://trac.webkit.org/changeset/230097 and auto-magically used a
+        script to update copyright headers... and that broke the tests
+        which checked for a particular date. Update all of the headers.
+
+        Part of this change updates the code generated by messages.py
+
+        * Scripts/webkit/LegacyMessageReceiver-expected.cpp:
+        * Scripts/webkit/MessageReceiver-expected.cpp:
+        * Scripts/webkit/MessageReceiverSuperclass-expected.cpp:
+        * Scripts/webkit/MessagesSuperclass-expected.h:
+        * Scripts/webkit/messages.py:
+        * Scripts/webkit/messages_unittest.py:
+        (GeneratedFileContentsTest.assertGeneratedFileContentsEqual):
+        generate a better error message
+
 2018-03-29  JF Bastien  <[email protected]>
 
         Use Forward.h instead of forward-declaring WTF::String

Modified: trunk/Source/WebKit/Scripts/webkit/LegacyMessageReceiver-expected.cpp (230107 => 230108)


--- trunk/Source/WebKit/Scripts/webkit/LegacyMessageReceiver-expected.cpp	2018-03-30 16:55:12 UTC (rev 230107)
+++ trunk/Source/WebKit/Scripts/webkit/LegacyMessageReceiver-expected.cpp	2018-03-30 17:30:18 UTC (rev 230108)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: trunk/Source/WebKit/Scripts/webkit/MessageReceiver-expected.cpp (230107 => 230108)


--- trunk/Source/WebKit/Scripts/webkit/MessageReceiver-expected.cpp	2018-03-30 16:55:12 UTC (rev 230107)
+++ trunk/Source/WebKit/Scripts/webkit/MessageReceiver-expected.cpp	2018-03-30 17:30:18 UTC (rev 230108)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: trunk/Source/WebKit/Scripts/webkit/MessageReceiverSuperclass-expected.cpp (230107 => 230108)


--- trunk/Source/WebKit/Scripts/webkit/MessageReceiverSuperclass-expected.cpp	2018-03-30 16:55:12 UTC (rev 230107)
+++ trunk/Source/WebKit/Scripts/webkit/MessageReceiverSuperclass-expected.cpp	2018-03-30 17:30:18 UTC (rev 230108)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: trunk/Source/WebKit/Scripts/webkit/MessagesSuperclass-expected.h (230107 => 230108)


--- trunk/Source/WebKit/Scripts/webkit/MessagesSuperclass-expected.h	2018-03-30 16:55:12 UTC (rev 230107)
+++ trunk/Source/WebKit/Scripts/webkit/MessagesSuperclass-expected.h	2018-03-30 17:30:18 UTC (rev 230108)
@@ -26,7 +26,9 @@
 
 #include "ArgumentCoders.h"
 #include <wtf/Forward.h>
+#include <wtf/text/WTFString.h>
 
+
 namespace Messages {
 namespace WebPage {
 

Modified: trunk/Source/WebKit/Scripts/webkit/messages.py (230107 => 230108)


--- trunk/Source/WebKit/Scripts/webkit/messages.py	2018-03-30 16:55:12 UTC (rev 230107)
+++ trunk/Source/WebKit/Scripts/webkit/messages.py	2018-03-30 17:30:18 UTC (rev 230108)
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2017 Apple Inc. All rights reserved.
+# Copyright (C) 2010-2018 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -31,7 +31,7 @@
 DELAYED_ATTRIBUTE = 'Delayed'
 
 _license_header = """/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -172,6 +172,7 @@
 
     headers = set([
         '"ArgumentCoders.h"',
+        '<wtf/Forward.h>',
     ])
 
     non_template_wtf_types = frozenset([
@@ -191,6 +192,7 @@
         'WebCore::ServiceWorkerOrClientIdentifier',
         'WebCore::ServiceWorkerRegistrationIdentifier',
         'WebCore::SWServerConnectionIdentifier',
+        'String',
     ])
 
     for parameter in receiver.iterparameters():

Modified: trunk/Source/WebKit/Scripts/webkit/messages_unittest.py (230107 => 230108)


--- trunk/Source/WebKit/Scripts/webkit/messages_unittest.py	2018-03-30 16:55:12 UTC (rev 230107)
+++ trunk/Source/WebKit/Scripts/webkit/messages_unittest.py	2018-03-30 17:30:18 UTC (rev 230108)
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2017 Apple Inc. All rights reserved.
+# Copyright (C) 2010-2018 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -300,20 +300,24 @@
 
 class GeneratedFileContentsTest(unittest.TestCase):
     def assertGeneratedFileContentsEqual(self, actual_file_contents, expected_file_name):
-        if reset_results:
-            with open(os.path.join(script_directory, expected_file_name), mode='w') as out_file:
-                out_file.write(actual_file_contents)
-            return
+        try:
+            if reset_results:
+                with open(os.path.join(script_directory, expected_file_name), mode='w') as out_file:
+                    out_file.write(actual_file_contents)
+                return
 
-        with open(os.path.join(script_directory, expected_file_name), mode='r') as in_file:
-            expected_file_contents = in_file.read()
-        actual_line_list = actual_file_contents.splitlines(False)
-        expected_line_list = expected_file_contents.splitlines(False)
+            with open(os.path.join(script_directory, expected_file_name), mode='r') as in_file:
+                expected_file_contents = in_file.read()
+            actual_line_list = actual_file_contents.splitlines(False)
+            expected_line_list = expected_file_contents.splitlines(False)
 
-        for index, actual_line in enumerate(actual_line_list):
-            self.assertEquals(actual_line, expected_line_list[index])
+            for index, actual_line in enumerate(actual_line_list):
+                self.assertEquals(actual_line, expected_line_list[index])
 
-        self.assertEquals(len(actual_line_list), len(expected_line_list))
+            self.assertEquals(len(actual_line_list), len(expected_line_list))
+        except:
+            sys.stderr.write('In expected file %s\n' % expected_file_name)
+            raise
 
     def assertHeaderEqual(self, input_messages_file_contents, expected_file_name):
         actual_file_contents = messages.generate_messages_header(StringIO(input_messages_file_contents))
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to