Title: [104670] trunk/Tools
- Revision
- 104670
- Author
- [email protected]
- Date
- 2012-01-10 22:07:37 -0800 (Tue, 10 Jan 2012)
Log Message
Extract common code for comparing WTF::String objects into WTFStringUtilities.h
Reviewed by Adam Barth.
Needed for: <http://webkit.org/b/75774> Add TestWebKitAPI tests for KURL
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add
WTFStringUtilities.h to the project.
* TestWebKitAPI/Tests/WTF/StringBuilder.cpp: Update to use
WTFStringUtilities.h.
* TestWebKitAPI/WTFStringUtilities.h: Added.
(WTF::operator<<):
Modified Paths
Added Paths
Diff
Modified: trunk/Tools/ChangeLog (104669 => 104670)
--- trunk/Tools/ChangeLog 2012-01-11 05:34:54 UTC (rev 104669)
+++ trunk/Tools/ChangeLog 2012-01-11 06:07:37 UTC (rev 104670)
@@ -1,3 +1,18 @@
+2012-01-10 David Kilzer <[email protected]>
+
+ Extract common code for comparing WTF::String objects into WTFStringUtilities.h
+
+ Reviewed by Adam Barth.
+
+ Needed for: <http://webkit.org/b/75774> Add TestWebKitAPI tests for KURL
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add
+ WTFStringUtilities.h to the project.
+ * TestWebKitAPI/Tests/WTF/StringBuilder.cpp: Update to use
+ WTFStringUtilities.h.
+ * TestWebKitAPI/WTFStringUtilities.h: Added.
+ (WTF::operator<<):
+
2012-01-10 Vincent Scheib <[email protected]>
Clarify run-webkit-tests options reset-results and new-baseline
Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (104669 => 104670)
--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2012-01-11 05:34:54 UTC (rev 104669)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2012-01-11 06:07:37 UTC (rev 104670)
@@ -181,6 +181,7 @@
37A6895D148A9B50005100FA /* SubresourceErrorCrash.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SubresourceErrorCrash.mm; sourceTree = "<group>"; };
37DC678B140D7C5000ABCCDB /* DOMRangeOfString.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMRangeOfString.mm; sourceTree = "<group>"; };
37DC678F140D7D3A00ABCCDB /* DOMRangeOfString.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = DOMRangeOfString.html; sourceTree = "<group>"; };
+ 44A622C114A0E2B60048515B /* WTFStringUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WTFStringUtilities.h; sourceTree = "<group>"; };
4BFDFFA61314776C0061F24B /* HitTestResultNodeHandle_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HitTestResultNodeHandle_Bundle.cpp; sourceTree = "<group>"; };
4BFDFFA8131477770061F24B /* HitTestResultNodeHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HitTestResultNodeHandle.cpp; sourceTree = "<group>"; };
520BCF4A141EB09E00937EA8 /* WebArchive_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebArchive_Bundle.cpp; sourceTree = "<group>"; };
@@ -327,6 +328,7 @@
BCB9E7FA112359A300A137E0 /* Test.h */,
BC131AA8117131FC00B69727 /* TestsController.cpp */,
BCB9E7C711234E3A00A137E0 /* TestsController.h */,
+ 44A622C114A0E2B60048515B /* WTFStringUtilities.h */,
);
name = Source;
sourceTree = "<group>";
Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp (104669 => 104670)
--- trunk/Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp 2012-01-11 05:34:54 UTC (rev 104669)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp 2012-01-11 06:07:37 UTC (rev 104670)
@@ -29,21 +29,8 @@
*/
#include "config.h"
-#include <wtf/Assertions.h>
-#include <wtf/text/CString.h>
-#include <wtf/text/StringBuilder.h>
-#include <wtf/text/WTFString.h>
+#include "WTFStringUtilities.h"
-namespace WTF {
-
-// For EXPECT_EQ(String, String)
-std::ostream& operator<<(std::ostream& os, const String& string)
-{
- return os << string.utf8().data();
-}
-
-}
-
namespace TestWebKitAPI {
void expectBuilderContent(const char* expected, const StringBuilder& builder)
Added: trunk/Tools/TestWebKitAPI/WTFStringUtilities.h (0 => 104670)
--- trunk/Tools/TestWebKitAPI/WTFStringUtilities.h (rev 0)
+++ trunk/Tools/TestWebKitAPI/WTFStringUtilities.h 2012-01-11 06:07:37 UTC (rev 104670)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WTFStringUtilities_h
+#define WTFStringUtilities_h
+
+#include <wtf/Assertions.h>
+#include <wtf/text/CString.h>
+#include <wtf/text/StringBuilder.h>
+#include <wtf/text/WTFString.h>
+
+namespace WTF {
+
+inline std::ostream& operator<<(std::ostream& os, const String& string)
+{
+ return os << string.utf8().data();
+}
+
+}
+
+#endif // WTFStringUtilities_h
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes