summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-01-11 10:03:25 +0100
committerSimon Hausmann <simon.hausmann@nokia.com>2012-01-11 10:03:25 +0100
commitd11f84f5b5cdc0d92a08af01b13472fdd5f9acb9 (patch)
treeb318cf594dc1da2fa48224005945c9157f35bb41 /Tools
parent6300a96eca9f152b379f1bcf3d9efdc5572d989a (diff)
downloadqtwebkit-d11f84f5b5cdc0d92a08af01b13472fdd5f9acb9.tar.gz
Imported WebKit commit 75bb2fc5882d2e1b3d5572c2961507996cbca5e3 (http://svn.webkit.org/repository/webkit/trunk@104681)
Diffstat (limited to 'Tools')
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg21
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders_unittests.js10
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js5
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/failures.js4
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/failures_unittests.js8
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js4
-rwxr-xr-xTools/BuildSlaveSupport/build.webkit.org-config/templates/root.html11
-rw-r--r--Tools/ChangeLog1007
-rw-r--r--Tools/DumpRenderTree/PixelDumpSupport.h10
-rw-r--r--Tools/DumpRenderTree/chromium/DumpRenderTree.cpp5
-rw-r--r--Tools/DumpRenderTree/chromium/LayoutTestController.cpp21
-rw-r--r--Tools/DumpRenderTree/chromium/LayoutTestController.h1
-rw-r--r--Tools/DumpRenderTree/chromium/TestShell.cpp2
-rw-r--r--Tools/DumpRenderTree/chromium/TestShell.h2
-rw-r--r--Tools/DumpRenderTree/chromium/WebPreferences.cpp2
-rw-r--r--Tools/DumpRenderTree/chromium/WebPreferences.h1
-rw-r--r--Tools/DumpRenderTree/chromium/WebViewHost.cpp7
-rw-r--r--Tools/DumpRenderTree/chromium/WebViewHost.h1
-rw-r--r--Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp9
-rw-r--r--Tools/DumpRenderTree/mac/DumpRenderTree.mm71
-rw-r--r--Tools/DumpRenderTree/mac/PixelDumpSupportMac.mm75
-rw-r--r--Tools/DumpRenderTree/qt/DumpRenderTree.pro1
-rw-r--r--Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp18
-rw-r--r--Tools/DumpRenderTree/qt/fonts.conf17
-rw-r--r--Tools/MiniBrowser/gtk/GNUmakefile.am3
-rw-r--r--Tools/MiniBrowser/qt/BrowserWindow.cpp10
-rw-r--r--Tools/MiniBrowser/qt/BrowserWindow.h2
-rw-r--r--Tools/MiniBrowser/qt/MiniBrowser.qrc1
-rw-r--r--Tools/MiniBrowser/qt/MiniBrowserApplication.cpp19
-rw-r--r--Tools/MiniBrowser/qt/MiniBrowserApplication.h19
-rw-r--r--Tools/MiniBrowser/qt/icons/touch.pngbin0 -> 6803 bytes
-rw-r--r--Tools/MiniBrowser/qt/main.cpp4
-rw-r--r--Tools/MiniBrowser/qt/qml/BrowserWindow.qml49
-rw-r--r--Tools/MiniBrowser/win/BrowserView.cpp4
-rw-r--r--Tools/MiniBrowser/win/BrowserWindow.cpp2
-rw-r--r--Tools/QtTestBrowser/QtTestBrowser.pro2
-rw-r--r--Tools/QtTestBrowser/launcherwindow.h4
-rw-r--r--Tools/QtTestBrowser/webpage.cpp11
-rwxr-xr-xTools/Scripts/build-webkit2
-rwxr-xr-xTools/Scripts/check-webkit-style4
-rwxr-xr-xTools/Scripts/new-run-webkit-httpd2
-rwxr-xr-xTools/Scripts/new-run-webkit-tests4
-rwxr-xr-xTools/Scripts/prepare-ChangeLog85
-rwxr-xr-xTools/Scripts/rebaseline-chromium-webkit-tests4
-rwxr-xr-xTools/Scripts/run-api-tests82
-rwxr-xr-xTools/Scripts/run-webkit-tests2
-rwxr-xr-xTools/Scripts/test-webkitpy83
-rwxr-xr-xTools/Scripts/webkit-patch19
-rwxr-xr-xTools/Scripts/webkitdirs.pm8
-rw-r--r--Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/parser_unittests.pl15
-rw-r--r--Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/css_unittests-expected.txt92
-rw-r--r--Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/css_unittests.css85
-rw-r--r--Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/javascript_unittests-expected.txt132
-rw-r--r--Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/javascript_unittests.js150
-rw-r--r--Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/perl_unittests-expected.txt50
-rw-r--r--Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/perl_unittests.pl87
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py14
-rw-r--r--Tools/Scripts/webkitpy/common/config/build.py6
-rw-r--r--Tools/Scripts/webkitpy/common/config/build_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/common/config/committers.py1
-rw-r--r--Tools/Scripts/webkitpy/common/config/ports.py8
-rw-r--r--Tools/Scripts/webkitpy/common/config/ports_mock.py3
-rw-r--r--Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py52
-rw-r--r--Tools/Scripts/webkitpy/common/net/buildbot/buildbot_mock.py15
-rw-r--r--Tools/Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py111
-rw-r--r--Tools/Scripts/webkitpy/common/system/executive.py5
-rw-r--r--Tools/Scripts/webkitpy/common/system/platforminfo.py114
-rw-r--r--Tools/Scripts/webkitpy/common/system/platforminfo_mock.py12
-rw-r--r--Tools/Scripts/webkitpy/common/system/platforminfo_unittest.py174
-rw-r--r--Tools/Scripts/webkitpy/common/system/systemhost.py4
-rw-r--r--Tools/Scripts/webkitpy/common/version_check.py34
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py4
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py4
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/apple.py1
-rwxr-xr-xTools/Scripts/webkitpy/layout_tests/port/base.py60
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py31
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/builders.py7
-rwxr-xr-xTools/Scripts/webkitpy/layout_tests/port/chromium.py8
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu.py22
-rwxr-xr-xTools/Scripts/webkitpy/layout_tests/port/chromium_gpu_unittest.py14
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py40
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py1
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py14
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/driver.py45
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/driver_unittest.py77
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/dryrun.py2
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/factory.py9
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/google_chrome_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/gtk.py5
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/mac.py3
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/mock_drt.py7
-rwxr-xr-xTools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py22
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/test.py67
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/webkit.py9
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/win.py1
-rwxr-xr-xTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py9
-rwxr-xr-xTools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py3
-rw-r--r--Tools/Scripts/webkitpy/python24/__init__.py1
-rw-r--r--Tools/Scripts/webkitpy/python24/versioning.py135
-rw-r--r--Tools/Scripts/webkitpy/python24/versioning_unittest.py134
-rw-r--r--Tools/Scripts/webkitpy/to_be_moved/rebaseline_chromium_webkit_tests.py2
-rw-r--r--Tools/Scripts/webkitpy/to_be_moved/rebaseline_chromium_webkit_tests_unittest.py67
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/download_unittest.py11
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py16
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/runtests.py5
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/runtests_unittest.py1
-rw-r--r--Tools/TestResultServer/static-dashboards/builders.js11
-rw-r--r--Tools/TestResultServer/static-dashboards/flakiness_dashboard.html4
-rw-r--r--Tools/TestResultServer/static-dashboards/flakiness_dashboard_tests.js20
-rw-r--r--Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj14
-rw-r--r--Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp15
-rw-r--r--Tools/TestWebKitAPI/Tests/WebCore/KURL.cpp75
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/RenderedImageFromDOMRange.mm7
-rw-r--r--Tools/TestWebKitAPI/WTFStringUtilities.h48
-rw-r--r--Tools/WebKitTestRunner/cg/TestInvocationCG.cpp11
-rw-r--r--Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm5
-rw-r--r--Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp4
-rw-r--r--Tools/qmake/mkspecs/features/features.prf2
-rw-r--r--Tools/qmake/mkspecs/features/minimal_qt.prf1
-rw-r--r--Tools/qmake/mkspecs/features/uitools.prf23
121 files changed, 2772 insertions, 1213 deletions
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg b/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg
index f2ce836c8..b1db9f7c9 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg
@@ -20,7 +20,6 @@ import urllib
from committer_auth import CommitterAuth
from webkitpy.common.config import build as wkbuild
-from webkitpy.common.net.buildbot import BuildBot as wkbuildbot
c = BuildmasterConfig = {}
@@ -766,9 +765,6 @@ def loadBuilderConfig(c):
passwords = simplejson.load(open('passwords.json'))
config = simplejson.load(open('config.json'))
- # use webkitpy's buildbot module to test for core builders
- wkbb = wkbuildbot()
-
c['slaves'] = [BuildSlave(slave['name'], passwords[slave['name']], max_builds=1) for slave in config['slaves']]
c['schedulers'] = []
@@ -798,6 +794,8 @@ def loadBuilderConfig(c):
break
+ platform = builder['platform']
+
factory = globals()["%sFactory" % builder.pop('type')]
factoryArgs = []
for key in "platform", "configuration", "architectures", "triggers":
@@ -812,9 +810,18 @@ def loadBuilderConfig(c):
builder["factory"] = factory(*factoryArgs, **factoryKwArgs)
- builder["category"] = "noncore"
- if wkbb._is_core_builder(builder['name']):
- builder["category"] = "core"
+ if platform.startswith('chromium'):
+ builder["category"] = 'Chromium'
+ elif platform.startswith('mac'):
+ builder["category"] = 'AppleMac'
+ elif platform == 'win':
+ builder["category"] = 'AppleWin'
+ elif platform.startswith('gtk'):
+ builder["category"] = 'GTK'
+ elif platform.startswith('qt'):
+ builder["category"] = 'Qt'
+ else:
+ builder["category"] = 'misc'
c['builders'].append(builder)
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders_unittests.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders_unittests.js
index 263188d8f..c3c15c940 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders_unittests.js
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders_unittests.js
@@ -37,7 +37,7 @@ var kExampleBuilderStatusJSON = {
"slaves": ["vm124-m1"],
"state": "building"
},
- "Webkit Mac10.6 (CG)": {
+ "Webkit Mac10.6": {
"basedir": "Webkit_Linux",
"cachedBuilds": [11459, 11460, 11461, 11462],
"category": "6webkit linux latest",
@@ -598,7 +598,7 @@ test("buildersFailingStepRequredForTestCoverage", 3, function() {
callback(kExampleBuilderStatusJSON);
else if (/Webkit%20Linux/.exec(url))
callback(kExampleBuildInfoJSON);
- else if (/Webkit%20Mac10\.6%20\(CG\)/.exec(url))
+ else if (/Webkit%20Mac10\.6/.exec(url))
callback(failingBuildInfoJSON);
else {
ok(false, "Unexpected URL: " + url);
@@ -609,14 +609,14 @@ test("buildersFailingStepRequredForTestCoverage", 3, function() {
simulator.runTest(function() {
builders.buildersFailingStepRequredForTestCoverage(function(builderNameList) {
- deepEqual(builderNameList, ["Webkit Mac10.6 (CG)"]);
+ deepEqual(builderNameList, ["Webkit Mac10.6"]);
});
});
deepEqual(requestedURLs, [
"http://build.chromium.org/p/chromium.webkit/json/builders",
"http://build.chromium.org/p/chromium.webkit/json/builders/Webkit%20Linux/builds/11461",
- "http://build.chromium.org/p/chromium.webkit/json/builders/Webkit%20Mac10.6%20(CG)/builds/11460",
+ "http://build.chromium.org/p/chromium.webkit/json/builders/Webkit%20Mac10.6/builds/11460",
]);
});
@@ -624,7 +624,7 @@ test("buildersFailingStepRequredForTestCoverage (run-webkit-tests crash)", 3, fu
var simulator = new NetworkSimulator();
var builderStatusJSON = JSON.parse(JSON.stringify(kExampleBuilderStatusJSON));
- delete builderStatusJSON['Webkit Mac10.6 (CG)'];
+ delete builderStatusJSON['Webkit Mac10.6'];
builderStatusJSON['Webkit Linux'].cachedBuilds = [21460];
builderStatusJSON['Webkit Linux'].currentBuilds = [];
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js
index 6090819eb..4b3b7a087 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js
@@ -42,11 +42,6 @@ config.kBuilders = {
'Webkit Mac10.5 (dbg)(2)': {version: 'leopard', debug: true},
'Webkit Mac10.6': {version: 'snowleopard'},
'Webkit Mac10.6 (dbg)': {version: 'snowleopard', debug: true},
- 'Webkit Mac10.5 (CG)': {version: 'leopard', isCG: true},
- 'Webkit Mac10.5 (CG)(dbg)(1)': {version: 'leopard', isCG: true, debug: true},
- 'Webkit Mac10.5 (CG)(dbg)(2)': {version: 'leopard', isCG: true, debug: true},
- 'Webkit Mac10.6 (CG)': {version: 'snowleopard', isCG: true},
- 'Webkit Mac10.6 (CG)(dbg)': {version: 'snowleopard', isCG: true, debug: true},
};
config.kBuildersThatOnlyCompile = [
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/failures.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/failures.js
index b5c330c15..ff9652453 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/failures.js
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/failures.js
@@ -36,8 +36,6 @@ ui.failures.Builder = base.extends('a', {
var configuration = config.kBuilders[builderName];
if (configuration.version)
this._addSpan('version', configuration.version);
- if (configuration.isCG)
- this._addSpan('graphics', 'CG');
if (configuration.is64bit)
this._addSpan('architecture', '64-bit');
this._configuration = configuration;
@@ -53,7 +51,7 @@ ui.failures.Builder = base.extends('a', {
},
equals: function(configuration)
{
- return this._configuration.is64bit == configuration.is64bit && this._configuration.isCG == configuration.isCG && this._configuration.version == configuration.version;
+ return this._configuration.is64bit == configuration.is64bit && this._configuration.version == configuration.version;
}
});
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/failures_unittests.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/failures_unittests.js
index fd9ac929a..0c54973f3 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/failures_unittests.js
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/failures_unittests.js
@@ -97,13 +97,13 @@ test('FailureGrid', 10, function() {
'<tr class="BUILDING" style="display: none; "><td><span>BUILDING</span></td><td></td><td></td></tr>' +
'</tbody>' +
'</table>');
- grid.update({'Webkit Mac10.5 (CG)': { actual: 'IMAGE+TEXT'}});
+ grid.update({'Webkit Mac10.5': { actual: 'IMAGE+TEXT'}});
equal(grid.outerHTML, '<table class="failures">' +
'<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' +
'<tbody>' +
'<tr class="IMAGE+TEXT">' +
'<td><span>IMAGE+TEXT</span></td>' +
- '<td><a class="failing-builder" target="_blank" href="http://build.chromium.org/p/chromium.webkit/waterfall?builder=Webkit+Mac10.5+(CG)"><span class="version">leopard</span><span class="graphics">CG</span></a></td>' +
+ '<td><a class="failing-builder" target="_blank" href="http://build.chromium.org/p/chromium.webkit/waterfall?builder=Webkit+Mac10.5"><span class="version">leopard</span></a></td>' +
'<td></td>' +
'</tr>' +
'<tr class="TEXT">' +
@@ -114,13 +114,13 @@ test('FailureGrid', 10, function() {
'<tr class="BUILDING" style="display: none; "><td><span>BUILDING</span></td><td></td><td></td></tr>' +
'</tbody>' +
'</table>');
- grid.update({'Webkit Mac10.5 (CG)': { actual: 'IMAGE+TEXT'}});
+ grid.update({'Webkit Mac10.5': { actual: 'IMAGE+TEXT'}});
equal(grid.outerHTML, '<table class="failures">' +
'<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' +
'<tbody>' +
'<tr class="IMAGE+TEXT">' +
'<td><span>IMAGE+TEXT</span></td>' +
- '<td><a class="failing-builder" target="_blank" href="http://build.chromium.org/p/chromium.webkit/waterfall?builder=Webkit+Mac10.5+(CG)"><span class="version">leopard</span><span class="graphics">CG</span></a></td>' +
+ '<td><a class="failing-builder" target="_blank" href="http://build.chromium.org/p/chromium.webkit/waterfall?builder=Webkit+Mac10.5"><span class="version">leopard</span></a></td>' +
'<td></td>' +
'</tr>' +
'<tr class="TEXT">' +
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js
index 85bd37c98..f5c292a82 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js
@@ -240,7 +240,7 @@ test('FailingTestsSummary', 12, function() {
'</ul>' +
'</div>');
- testFailures.updateBuilderResults({'Webkit Mac10.5 (CG)': { actual: 'BUILDING'}});
+ testFailures.updateBuilderResults({'Webkit Mac10.5': { actual: 'BUILDING'}});
equal(testFailures.innerHTML,
'<div class="how">' +
'<time class="relative">10 minutes ago</time>' +
@@ -254,7 +254,7 @@ test('FailingTestsSummary', 12, function() {
'</tr>' +
'<tr class="BUILDING" style="">' +
'<td><span>BUILDING</span></td>' +
- '<td><a class="failing-builder" target="_blank" href="http://build.chromium.org/p/chromium.webkit/waterfall?builder=Webkit+Mac10.5+(CG)"><span class="version">leopard</span><span class="graphics">CG</span></a></td>' +
+ '<td><a class="failing-builder" target="_blank" href="http://build.chromium.org/p/chromium.webkit/waterfall?builder=Webkit+Mac10.5"><span class="version">leopard</span></a></td>' +
'<td></td>' +
'</tr>' +
'</tbody>' +
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/templates/root.html b/Tools/BuildSlaveSupport/build.webkit.org-config/templates/root.html
index b2587cc2a..3deb2fdd3 100755
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/templates/root.html
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/templates/root.html
@@ -9,10 +9,13 @@
<h1>Welcome to the Buildbot!</h1>
<ul>
- <li><a href="console?category=core">Core Console</a></li>
- <li><a href="waterfall?category=core">Core Waterfall</a></li>
- <li><a href="console">Console</a></li>
- <li><a href="waterfall">Waterfall Display</a> will give you a time-oriented summary of recent buildbot activity.</li>
+ <li><a href="console">Console</a> - <a href="console?category=AppleMac">Apple Mac</a>, <a href="console?category=AppleWin">Apple Windows</a>,
+ <a href="console?category=GTK">GTK+</a>, <a href="console?category=Qt">Qt</a>, <a href="console?category=Chromium">Chromium</a>,
+ and <a href="console?category=misc">miscellaneous</a></li>
+ <li><a href="waterfall">Waterfall Display</a>, a time-oriented summary of recent buildbot activity
+ - <a href="waterfall?category=AppleMac">Apple Mac</a>, <a href="waterfall?category=AppleWin">Apple Windows</a>,
+ <a href="waterfall?category=GTK">GTK+</a>, <a href="waterfall?category=Qt">Qt</a>, <a href="waterfall?category=Chromium">Chromium</a>,
+ and <a href="waterfall?category=misc">miscellaneous</a></li>
<li><a href="one_box_per_builder">Latest Build</a> for each builder is here.</li>
<li><a href="one_line_per_build">Recent Builds</a> are summarized here, one per line.</li>
<li><a href="buildslaves">Buildslave</a> information</li>
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index 3db18c59b..b6de0ff9f 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,1010 @@
+2012-01-10 David Kilzer <ddkilzer@apple.com>
+
+ Add TestWebKitAPI tests for KURL
+ <http://webkit.org/b/75774>
+
+ Reviewed by Adam Barth.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add a
+ WebCore folder and KURL.cpp source file to the project.
+ * TestWebKitAPI/Tests/WebCore/KURL.cpp: Added.
+ (TestWebKitAPI::WebCore::SetUp): Initialize the main thread
+ during setup since this test doesn't go through WebKit or
+ WebKit2.
+ (TestWebKitAPI::TEST_F): Add two basic tests.
+
+2012-01-10 David Kilzer <ddkilzer@apple.com>
+
+ 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 <scheib@chromium.org>
+
+ Clarify run-webkit-tests options reset-results and new-baseline
+ https://bugs.webkit.org/show_bug.cgi?id=75993
+
+ Reviewed by Dirk Pranke.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (parse_args):
+
+2012-01-10 Simon Fraser <simon.fraser@apple.com>
+
+ Disabled mock scrollbars should draw differently
+ https://bugs.webkit.org/show_bug.cgi?id=75995
+
+ Reviewed by James Robinson.
+
+ When the scrollbar is disabled, paint the entire track of
+ mock scrollbars with a lighter gray, and hide the thumb.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (-[DRTMockScroller drawKnob]):
+ (-[DRTMockScroller drawRect:]):
+
+2012-01-10 James Robinson <jamesr@chromium.org>
+
+ [chromium] Run webkit_unit_tests as part of webkit-patch build-and-test
+ https://bugs.webkit.org/show_bug.cgi?id=75988
+
+ Reviewed by Adam Barth.
+
+ * Scripts/webkitpy/common/config/ports.py:
+ (WebKitPort.run_webkit_unit_tests_command):
+ (WebKitPort):
+ (ChromiumPort.run_webkit_unit_tests_command):
+ (ChromiumPort):
+ * Scripts/webkitpy/common/config/ports_mock.py:
+ (MockPort.run_webkit_unit_tests_command):
+ * Scripts/webkitpy/tool/commands/download_unittest.py:
+ (DownloadCommandsTest.test_build_and_test):
+ (test_land):
+ (test_land_red_builders):
+ * Scripts/webkitpy/tool/steps/runtests.py:
+ (RunTests.run):
+ * Scripts/webkitpy/tool/steps/runtests_unittest.py:
+
+2012-01-09 Dirk Pranke <dpranke@chromium.org>
+
+ webkitpy: add os_name, os_version to platforminfo
+ https://bugs.webkit.org/show_bug.cgi?id=75931
+
+ Reviewed by Eric Siedel.
+
+ As a first step in cleaning up the version parsing logic in
+ webkitpy.layout_tests.port, this adds common routines for
+ getting the os_name and os_version fields to the PlatformInfo
+ class. Nothing uses them yet but I've added FIXME's to some of
+ the code that needs to be deleted in the port files.
+
+ * Scripts/webkitpy/common/system/platforminfo.py:
+ (PlatformInfo.__init__):
+ (PlatformInfo):
+ (PlatformInfo._determine_os_name):
+ (PlatformInfo._determine_mac_version):
+ (PlatformInfo._determine_linux_version):
+ (PlatformInfo._determine_win_version):
+ (PlatformInfo.display_name):
+ (PlatformInfo.total_bytes_memory):
+ (PlatformInfo._compute_bytes_from_vm_stat_output):
+ (PlatformInfo.free_bytes_memory):
+ * Scripts/webkitpy/common/system/platforminfo_unittest.py: Added.
+ (TestPlatformInfo):
+ (TestPlatformInfo.make_info):
+ (TestPlatformInfo.make_info.mock_run_command):
+ (TestPlatformInfo.setUp):
+ (TestPlatformInfo.tearDown):
+ (TestPlatformInfo.test_basic):
+ (TestPlatformInfo.integration_test_basic):
+ (TestPlatformInfo.test_display_name_mac):
+ (TestPlatformInfo.test_display_name_win32):
+ (TestPlatformInfo.test_memory_mac):
+ (TestPlatformInfo.test_memory_win32):
+ (TestPlatformInfo.test_determine_os_name):
+ (TestPlatformInfo.test_determine_mac_version):
+ (TestPlatformInfo.test_determine_linux_version):
+ (TestPlatformInfo.test_determine_win_version_from_tuple):
+ (TestPlatformInfo.test_determine_win_version_from_cmd):
+ * Scripts/webkitpy/layout_tests/port/apple.py:
+ (ApplePort.__init__):
+ * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
+ (ChromiumMacPort.__init__):
+ * Scripts/webkitpy/layout_tests/port/mac.py:
+ (MacPort):
+ * Scripts/webkitpy/layout_tests/port/win.py:
+ (WinPort):
+
+2012-01-10 Adam Roben <aroben@apple.com>
+
+ Make it possible to type data: URLs into MiniBrowser on Windows
+
+ Fixes <http://webkit.org/b/75084> Crash when trying to navigate to a data: URL in
+ MiniBrowser on Windows
+
+ Reviewed by Darin Adler.
+
+ * MiniBrowser/win/BrowserWindow.cpp:
+ (BrowserWindow::handleMessage): Instead of checking for an "http://" prefix when deciding
+ whether to prepend "http://", just look for whether the typed URL contains a colon. If it
+ does, we assume it already has a scheme and don't modify it.
+
+2012-01-10 Adam Roben <aroben@apple.com>
+
+ Make MiniBrowser automatically escape invalid URL characters typed in its URL field
+
+ Fixes <http://webkit.org/b/75086> Crash when typing a data: URL containing double-quotes in
+ MiniBrowser on Windows
+
+ Reviewed by Darin Adler.
+
+ * MiniBrowser/win/BrowserView.cpp:
+ (BrowserView::goToURL): Pass the typed string through
+ CFURLCreateStringByAddingPercentEscapes before trying to create a URL from it.
+
+2012-01-10 Ben Wells <benwells@chromium.org>
+
+ Adding myself (benwells) to committers.py
+ https://bugs.webkit.org/show_bug.cgi?id=75971
+
+ Reviewed by Ojan Vafai.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-01-10 Mario Sanchez Prada <msanchez@igalia.com>
+
+ AX: support helpText() in DumpRenderTree
+ https://bugs.webkit.org/show_bug.cgi?id=40193
+
+ Reviewed by Chris Fleizach.
+
+ * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+ (AccessibilityUIElement::helpText): Implemented.
+
+2012-01-10 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r104572.
+ http://trac.webkit.org/changeset/104572
+ https://bugs.webkit.org/show_bug.cgi?id=75967
+
+ It broke zillion tests (Requested by Ossy on #webkit).
+
+ * DumpRenderTree/qt/EventSenderQt.cpp:
+ (EventSender::EventSender):
+ (EventSender::sendOrQueueEvent):
+ (EventSender::replaySavedEvents):
+ (EventSender::eventFilter):
+ * DumpRenderTree/qt/EventSenderQt.h:
+
+2012-01-10 Hugo Parente Lima <hugo.lima@openbossa.org>
+
+ [Qt] fast/events/dont-loose-last-event test fails on WK1
+ https://bugs.webkit.org/show_bug.cgi?id=73894
+
+ Reviewed by Simon Hausmann.
+
+ Empty the entire event queue when requested besides using
+ sendEvent instead of postEvent to make sure all events were
+ delivered.
+ This commit also removes not working DRT code to handle drag and drop,
+ for more refs see: https://bugs.webkit.org/show_bug.cgi?id=31332
+
+ * DumpRenderTree/qt/EventSenderQt.cpp:
+ (EventSender::EventSender):
+ (EventSender::sendOrQueueEvent):
+ (EventSender::replaySavedEvents):
+ * DumpRenderTree/qt/EventSenderQt.h:
+
+2012-01-10 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ [Qt] Enable CSS_FILTERS in Qt build
+ https://bugs.webkit.org/show_bug.cgi?id=75777
+
+ Add the CSS_FILTERS feature flag to Qt.
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * qmake/mkspecs/features/features.prf:
+
+2012-01-10 Simon Hausmann <simon.hausmann@nokia.com>
+
+ [Qt] Unreviewed -Werror build fix.
+
+ * MiniBrowser/qt/MiniBrowserApplication.cpp:
+ (MiniBrowserApplication::MiniBrowserApplication): Re-order initialization to match
+ declaration.
+
+2012-01-10 Simon Hausmann <simon.hausmann@nokia.com>
+
+ [Qt] Remove dependency to uitools
+ https://bugs.webkit.org/show_bug.cgi?id=75952
+
+ Reviewed by Tor Arne Vestbø.
+
+ QUiLoader is used for creating QLabel/QProgressBar widgets for
+ a layout test, to verify some widget embedding feature. Unfortunately
+ in Qt 5, QUiLoader is part of qttools, which depends on webkit, which
+ depends on qttools. Since we don't really _need_ QUiLoader for our tests,
+ let's break the circular dependency.
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::WebPage::createPlugin):
+ * QtTestBrowser/QtTestBrowser.pro:
+ * QtTestBrowser/launcherwindow.h:
+ * QtTestBrowser/webpage.cpp:
+ (WebPage::createPlugin):
+ * qmake/mkspecs/features/minimal_qt.prf:
+ * qmake/mkspecs/features/uitools.prf: Removed.
+
+2012-01-10 Alexander Færøy <alexander.faeroy@nokia.com>
+
+ [Qt] Don't expose m_windowOptions as part of the public interface in MiniBrowserApplication
+ https://bugs.webkit.org/show_bug.cgi?id=75894
+
+ Reviewed by Tor Arne Vestbø.
+
+ * MiniBrowser/qt/MiniBrowserApplication.h:
+ (MiniBrowserApplication::windowOptions):
+ * MiniBrowser/qt/main.cpp:
+ (main):
+
+2012-01-10 Simon Hausmann <simon.hausmann@nokia.com>
+
+ [Qt] DRT crashes with Qt 5
+ https://bugs.webkit.org/show_bug.cgi?id=75951
+
+ Reviewed by Ossy.
+
+ * DumpRenderTree/qt/fonts.conf: Add missing last-resort font fallback for Qt 5 where
+ Qt relies on font-config to define the default font family.
+
+2012-01-10 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] REGRESSION(r100130): Clean build feature is broken.
+ https://bugs.webkit.org/show_bug.cgi?id=75863
+
+ Reviewed by Tor Arne Vestbø.
+
+ * Scripts/webkitdirs.pm:
+ (buildQMakeProject):
+
+2012-01-10 Zeno Albisser <zeno@webkit.org>
+
+ [Qt][WK2] Fix keyboard shortcuts in MiniBrowser.
+ https://bugs.webkit.org/show_bug.cgi?id=75885
+
+ In QML events are propagated through parents. But since the
+ WebView may consume key events, a shortcut might never reach
+ the top QtQuickItem.
+ Therefore an application wide event handling function in C++
+ needs to take care of shortcuts for MiniBrowser.
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * MiniBrowser/qt/BrowserWindow.cpp:
+ (BrowserWindow::reload):
+ (BrowserWindow::focusAddressBar):
+ * MiniBrowser/qt/BrowserWindow.h:
+ * MiniBrowser/qt/MiniBrowserApplication.cpp:
+ (MiniBrowserApplication::notify):
+ * MiniBrowser/qt/qml/BrowserWindow.qml:
+
+2012-01-10 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Add --efl alias for --platform=efl to run-webkit-test
+ https://bugs.webkit.org/show_bug.cgi?id=75937
+
+ Reviewed by Andreas Kling.
+
+ * Scripts/run-webkit-tests: Add --efl alias.
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py: Add --efl alias.
+ (parse_args):
+
+2012-01-09 Dan Bernstein <mitz@apple.com>
+
+ -[DOMRange renderedImageForcingBlackText:] fails with non-user-selectable text
+ https://bugs.webkit.org/show_bug.cgi?id=75920
+
+ Reviewed by Darin Adler.
+
+ * TestWebKitAPI/Tests/mac/RenderedImageFromDOMRange.mm:
+ (TestWebKitAPI::TEST): Added a test for a range in a
+ -webkit-user-select: none; block.
+
+2012-01-09 Dirk Pranke <dpranke@chromium.org>
+
+ webkitpy.layout_tests.port.mock_drt_unittest.MockChromiumDRTTest has been failing on cr-win
+ https://bugs.webkit.org/show_bug.cgi?id=75884
+
+ Reviewed by Ryosuke Niwa.
+
+ Fix regression introduced (revealed?) in r104340. Chromium file
+ url syntax is different on win32 and the test results weren't
+ expecting that.
+
+ * Scripts/webkitpy/layout_tests/models/test_expectations.py:
+ (TestExpectations._report_errors):
+ * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
+ (test_parse_error_nonfatal):
+ * Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py:
+ (MockDRTTest.input_line):
+ (MockChromiumDRTTest.test_pixeltest__fails):
+ * Scripts/webkitpy/layout_tests/port/test.py:
+ * Scripts/webkitpy/to_be_moved/rebaseline_chromium_webkit_tests_unittest.py:
+ (TestRebaseliner.make_rebaseliner):
+ (TestRebaseliner.test_one_platform):
+ (TestRebaseliner.test_all_platforms):
+ (TestRebaseliner.test_png_file_with_comment):
+ (TestRebaseliner.test_png_file_with_comment_remove_old_checksum):
+ (TestRebaseliner.test_png_file_with_comment_as_duplicate):
+ (TestRealMain.test_all_platforms):
+
+2012-01-09 Dirk Pranke <dpranke@chromium.org>
+
+ Fix regression in test-webkitpy introduced by removing the webkitpy/python24 directory.
+
+ Unreviewed, build fix.
+
+ test-webkitpy had a built-in self-test routine to verify that
+ deleting the .pyc files worked correctly. When I removed the
+ python24 directory in r104482, I broke the self-test.
+
+ I have deleted the self-test for now. Since I am reworking
+ test-webkitpy I will make sure the new version is adequately
+ tested.
+
+ * Scripts/test-webkitpy:
+ (configure_logging):
+ (_clean_pyc_files):
+ (_clean_packages):
+ (init):
+
+2012-01-09 Justin Novosad <junov@chromium.org>
+
+ [Chromium] remove all references to the legacy accelerated 2d Canvas
+ implementation
+ https://bugs.webkit.org/show_bug.cgi?id=75108
+
+ Purging an old settings flag that is no longer referenced
+
+ Reviewed by Darin Fisher.
+
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ (main):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+ (TestShell::resetWebSettings):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell::setAccelerated2dCanvasEnabled):
+ * DumpRenderTree/chromium/WebPreferences.cpp:
+ (WebPreferences::reset):
+ (WebPreferences::applyTo):
+ * DumpRenderTree/chromium/WebPreferences.h:
+
+2012-01-09 Adam Roben <aroben@apple.com>
+
+ Convert Cygwin paths to Windows paths before passing them to DRT
+
+ Fixes <http://webkit.org/b/64468> <rdar://problem/10663409> WIN: DumpRenderTree hangs under
+ NRWT
+
+ I couldn't find a way to test this because I couldn't figure out how to override the
+ cygpath function as it is used by WebKitDriver.
+
+ Reviewed by Dirk Pranke.
+
+ * Scripts/webkitpy/layout_tests/port/webkit.py:
+ (WebKitDriver._command_from_driver_input): On Cygwin, convert the test's path to a
+ Windows-style path before passing it to DRT.
+
+2012-01-06 Dirk Pranke <dpranke@chromium.org>
+
+ webkitpy: revamp version checking
+ https://bugs.webkit.org/show_bug.cgi?id=75765
+
+ Reviewed by Adam Barth.
+
+ The version-checking code in webkitpy/python24/versioning seems really
+ awkward and overdesigned, especially since we don't support python 2.4
+ any more.
+
+ In addition, I am tired of getting warnings about Python 2.6 being "a
+ newer release than what is supported" :).
+
+ I'm taking a page from the depot_tools python code and just creating a
+ new webkitpy.common.version_check module that will print a message on
+ stderr and call sys.exit() if we're running an unsupported version.
+
+ * Scripts/check-webkit-style:
+ * Scripts/new-run-webkit-httpd:
+ * Scripts/new-run-webkit-tests:
+ * Scripts/rebaseline-chromium-webkit-tests:
+ * Scripts/test-webkitpy:
+ (configure_logging):
+ (init):
+ * Scripts/webkit-patch:
+ (main):
+ * Scripts/webkitpy/common/system/executive.py:
+ (Executive._child_process_encoding):
+ (Executive._should_encode_child_process_arguments):
+ * Scripts/webkitpy/common/version_check.py: Copied from Tools/Scripts/rebaseline-chromium-webkit-tests.
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ * Scripts/webkitpy/python24/__init__.py: Removed.
+ * Scripts/webkitpy/python24/versioning.py: Removed.
+ * Scripts/webkitpy/python24/versioning_unittest.py: Removed.
+
+2012-01-09 Adam Barth <abarth@webkit.org>
+
+ Remove Chromium Mac CG from the flakiness dashboard
+ https://bugs.webkit.org/show_bug.cgi?id=75873
+
+ Reviewed by Ojan Vafai.
+
+ This configuration no longer exists.
+
+ * TestResultServer/static-dashboards/builders.js:
+ * TestResultServer/static-dashboards/flakiness_dashboard.html:
+ * TestResultServer/static-dashboards/flakiness_dashboard_tests.js:
+ (testOverrideJustBuildType):
+ (testPlatformAndBuildType):
+
+2012-01-06 Adam Roben <aroben@apple.com>
+
+ Print an error message when NRWT can't run Apache
+
+ Fixes <http://webkit.org/b/75712> NRWT mysteriously exits when Apache returns an error code
+
+ Reviewed by Dirk Pranke.
+
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.check_httpd): Print an error message when Apache returns an error code instead of
+ failing silently.
+
+ * Scripts/webkitpy/layout_tests/port/base_unittest.py:
+ (PortTest.test_check_httpd_success): Test that we don't print anything when we successfully
+ run Apache.
+ (PortTest.test_httpd_returns_error_code): Test that we print an error message when Apache
+ fails.
+
+2012-01-09 Gabor Rapcsanyi <rgabor@webkit.org>
+
+ [Gtk][ARM] Cross compiler buildbot is failing after r103040
+ https://bugs.webkit.org/show_bug.cgi?id=75846
+
+ Reviewed by Philippe Normand.
+
+ * Scripts/webkitdirs.pm:
+ (runAutogenForAutotoolsProjectIfNecessary):
+
+2012-01-09 Alexander Færøy <ahf@0x90.dk>
+
+ [Qt] Add support for dynamically enabling and disabling touch mocking in the Qt MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=75807
+
+ This patch adds a new icon to navigationbar of the Qt MiniBrowser
+ which allows you to dynamically toggle whether touch mocking is
+ enabled or disabled.
+
+ Reviewed by Tor Arne Vestbø.
+
+ * MiniBrowser/qt/MiniBrowser.qrc:
+ * MiniBrowser/qt/MiniBrowserApplication.cpp:
+ (MiniBrowserApplication::notify):
+ * MiniBrowser/qt/MiniBrowserApplication.h:
+ (WindowOptions::WindowOptions):
+ (WindowOptions::touchMockingEnabled):
+ (WindowOptions::setTouchMockingEnabled):
+ * MiniBrowser/qt/icons/touch.png: Added.
+ * MiniBrowser/qt/qml/BrowserWindow.qml:
+
+2012-01-09 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ Unreviewed. Fix make distcheck issues.
+
+ * MiniBrowser/gtk/GNUmakefile.am:
+
+2012-01-08 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r104421.
+ http://trac.webkit.org/changeset/104421
+ https://bugs.webkit.org/show_bug.cgi?id=75816
+
+ Need to rebaseline some tests on Linux (Requested by noamr on
+ #webkit).
+
+ * qmake/mkspecs/features/features.prf:
+
+2012-01-08 Adam Barth <abarth@webkit.org>
+
+ Remove support for Chromium Mac CG from garden-o-matic
+ https://bugs.webkit.org/show_bug.cgi?id=75814
+
+ Reviewed by Eric Seidel.
+
+ This configuration no longer exists. This patch is mostly a matter of
+ updating config.js and removing the examples from the unit tests.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders_unittests.js:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/failures.js:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/failures_unittests.js:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js:
+
+2012-01-08 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ [Qt] Enable CSS_FILTERS in Qt build
+ https://bugs.webkit.org/show_bug.cgi?id=75777
+
+ Add the CSS_FILTERS feature flag to Qt.
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * qmake/mkspecs/features/features.prf:
+
+2012-01-08 Ryosuke Niwa <rniwa@webkit.org>
+
+ Categorize bots by ports instead of core/non-core separation
+ https://bugs.webkit.org/show_bug.cgi?id=75766
+
+ Reviewed by Eric Seidel.
+
+ Rename categorizes so as to preserve the original ordering of bots per Eric's suggestion
+ (Chromium still comes before GTK and Qt).
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (loadBuilderConfig):
+ * BuildSlaveSupport/build.webkit.org-config/templates/root.html:
+
+2012-01-08 Ryosuke Niwa <rniwa@webkit.org>
+
+ Remove the concept of core builders from webkitpy
+ https://bugs.webkit.org/show_bug.cgi?id=75809
+
+ Reviewed by Ryosuke Niwa.
+
+ Treat all bots equally since core/non-core sepration has been removed from build.webkit.org,
+ and remove the relevant code.
+
+ * Scripts/webkitpy/common/net/buildbot/buildbot.py:
+ (BuildBot.__init__):
+ (BuildBot._matches_regexps):
+ (BuildBot._builder_statuses_with_names_matching_regexps):
+ (BuildBot.builder_statuses):
+ (BuildBot.failure_map):
+ (BuildBot._latest_builds_from_builders):
+ (BuildBot.last_green_revision):
+ * Scripts/webkitpy/common/net/buildbot/buildbot_mock.py:
+ (MockBuildBot.builder_statuses):
+ * Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py:
+ (test_status_parsing):
+ (test_last_green_revision):
+ (test_last_green_revision.mock_builds_from_builders):
+
+2012-01-08 Adam Barth <abarth@webkit.org>
+
+ Remove Chromium Mac CG concept from webkitpy
+ https://bugs.webkit.org/show_bug.cgi?id=75810
+
+ Reviewed by Ryosuke Niwa.
+
+ This configuration no longer exists. We can remove all the supporting
+ code from webkitpy.
+
+ * Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py:
+ (BaselineOptimizerTest.test_move_baselines):
+ (BaselineOptimizerTest.test_chromium_covers_mac_win_linux):
+ (BaselineOptimizerTest.test_chromium_mac_redundant_with_apple_mac):
+ (BaselineOptimizerTest.test_common_directory_includes_root):
+ (BaselineOptimizerTest.test_complex_shadowing):
+ * Scripts/webkitpy/common/config/build.py:
+ (_should_file_trigger_build):
+ * Scripts/webkitpy/common/config/build_unittest.py:
+ (ShouldBuildTest):
+ * Scripts/webkitpy/layout_tests/port/builders.py:
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ (ChromiumPort):
+ (ChromiumPort._generate_all_test_configurations):
+ * Scripts/webkitpy/layout_tests/port/chromium_gpu.py:
+ (_default_tests_paths):
+ (ChromiumGpuLinuxPort.tests):
+ * Scripts/webkitpy/layout_tests/port/chromium_gpu_unittest.py:
+ (ChromiumGpuTest.integration_test_chromium_gpu_mac):
+ (ChromiumGpuTest.assert_port_works):
+ (ChromiumGpuTest.test_baseline_paths):
+ (ChromiumGpuTest.test_graphics_type):
+ (ChromiumGpuTest.test_default_tests_paths):
+ (ChromiumGpuTest.test_test_files):
+ * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
+ (ChromiumMacPort):
+ (ChromiumMacPort.__init__):
+ (ChromiumMacPort.baseline_search_path):
+ * Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py:
+ (ChromiumMacPortTest.test_graphics_type):
+ * Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
+ (ChromiumPortTest.test_all_test_configurations):
+ * Scripts/webkitpy/layout_tests/port/dryrun.py:
+ * Scripts/webkitpy/layout_tests/port/factory.py:
+ (PortFactory._port_name_from_arguments_and_options):
+ (PortFactory.get):
+ * Scripts/webkitpy/layout_tests/port/factory_unittest.py:
+ (FactoryTest.test_chromium_gpu_mac):
+ (FactoryTest.test_chromium_mac):
+ * Scripts/webkitpy/layout_tests/port/google_chrome_unittest.py:
+ (GetGoogleChromePortTest._verify_expectations_overrides):
+ * Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py:
+ (MockChromiumDRTTest.test_chromium_parse_options):
+ * Scripts/webkitpy/to_be_moved/rebaseline_chromium_webkit_tests.py:
+ * Scripts/webkitpy/to_be_moved/rebaseline_chromium_webkit_tests_unittest.py:
+ (test_url_fetcher):
+ (test_zip_factory):
+ (test_archive):
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (TestRebaseline.test_rebaseline_expectations):
+
+2012-01-08 Ryosuke Niwa <rniwa@webkit.org>
+
+ Categorize bots by ports instead of core/non-core separation
+ https://bugs.webkit.org/show_bug.cgi?id=75766
+
+ Reviewed by Adam Barth.
+
+ Get rid of the concept of core/non-core builders, and categorize build bots by ports instead.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (loadBuilderConfig):
+ * BuildSlaveSupport/build.webkit.org-config/templates/root.html:
+
+2012-01-08 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r104403.
+ http://trac.webkit.org/changeset/104403
+ https://bugs.webkit.org/show_bug.cgi?id=75803
+
+ It broke all tests on Qt5 (Requested by Ossy_weekend on
+ #webkit).
+
+ * qmake/mkspecs/features/features.prf:
+
+2012-01-08 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ [Qt] Enable CSS_FILTERS in Qt build
+ https://bugs.webkit.org/show_bug.cgi?id=75777
+
+ Add the CSS_FILTERS feature flag to Qt.
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * qmake/mkspecs/features/features.prf:
+
+2012-01-04 Kentaro Hara <haraken@chromium.org>
+
+ Rewrite the CSS parser of prepare-ChangeLog with unittests.
+ https://bugs.webkit.org/show_bug.cgi?id=75202
+
+ Reviewed by David Kilzer.
+
+ The current CSS parser can just parse simple CSSes like
+
+ foo bar baz {
+ property1: value;
+ property2: value;
+ }
+
+ , and cannot parse comments nor a CSS in which a selector and {
+ appears in different lines. This patch rewrites the CSS parser
+ (i.e. get_selector_line_ranges_for_css()) so that it can parse more CSSes
+ shown in css_unittests.css.
+
+ Test: Scripts/webkitperl/prepare-ChangeLog_unittest/resources/css_unittests.css
+
+ * Scripts/prepare-ChangeLog:
+ (get_selector_line_ranges_for_css):
+ * Scripts/webkitperl/prepare-ChangeLog_unittest/parser_unittests.pl:
+ * Scripts/webkitperl/prepare-ChangeLog_unittest/resources/css_unittests-expected.txt: Added.
+ * Scripts/webkitperl/prepare-ChangeLog_unittest/resources/css_unittests.css: Added.
+ (element1):
+ (element2):
+ (element3):
+ (element4.p):
+ (element5.p.q.r.s):
+ (element6#p):
+ (element7 element8):
+ (element9.p element10.q):
+ (element11#p element12#q):
+ (element13, element14):
+ (.p):
+ (#p):
+ (.p element15 #q element16.r element17#s):
+ (element18:target):
+ (element19):
+ (element20):
+ (element21):
+ (element22):
+
+2012-01-04 Kentaro Hara <haraken@chromium.org>
+
+ The Perl parser of prepare-ChangeLog can parse here-documents
+ https://bugs.webkit.org/show_bug.cgi?id=73208
+
+ Reviewed by David Kilzer.
+
+ Currently prepare-ChangeLog cannot recognize here-documents in Perl,
+ which results in wrong subroutine names in ChangeLogs.
+ With this patch, prepare-ChangeLog can judge whether the line of "}"
+ is the end of a subroutine or a line inside a here-document.
+
+ Test: Scripts/webkitperl/prepare-ChangeLog_unittest/resources/perl_unittests.pl
+
+ * Scripts/prepare-ChangeLog:
+ (get_function_line_ranges_for_perl):
+ * Scripts/webkitperl/prepare-ChangeLog_unittest/resources/perl_unittests-expected.txt:
+ * Scripts/webkitperl/prepare-ChangeLog_unittest/resources/perl_unittests.pl:
+ Added test cases for here-documents.
+ (func7):
+ (func8):
+ (func9):
+ (func10):
+ (func11):
+ (func12):
+ (func13):
+ (func14):
+ (func15):
+ (func16):
+
+2012-01-08 Kentaro Hara <haraken@chromium.org>
+
+ Add unittests for the JavaScript parser of prepare-ChangeLog
+ https://bugs.webkit.org/show_bug.cgi?id=75201
+
+ Reviewed by David Kilzer.
+
+ javascript_unittests.js is a unittest for get_function_line_ranges_for_javascript()
+ of prepare-ChangeLog.
+
+ * Scripts/prepare-ChangeLog:
+ (get_function_line_ranges_for_javascript): Before this patch, a string found was just
+ omitted from parsing. Thus,
+
+ str = "foo"
+ function func() {
+ }
+
+ was recognized as equivalent to
+
+ str = function func() {
+ }
+
+ This patch replaces a string with a dummy identifier 'string_appeared_here'
+ to tell the parser that a string appeared there.
+
+ * Scripts/webkitperl/prepare-ChangeLog_unittest/parser_unittests.pl:
+ * Scripts/webkitperl/prepare-ChangeLog_unittest/resources/javascript_unittests-expected.txt: Added.
+ * Scripts/webkitperl/prepare-ChangeLog_unittest/resources/javascript_unittests.js: Added.
+ (func1):
+ (func2):
+ (func3):
+ (func4):
+ (func5):
+ (func6):
+ (func7):
+ (func8):
+ (func9):
+ (func10):
+ (func11):
+ (func12):
+ (funcOverloaded):
+ (Func1.prototype.get x1):
+ (Func1.prototype.get x2):
+ (Func1.prototype.set x1):
+ (Func1.prototype.set x3):
+ (Func2.prototype.func13):
+ (Func2.prototype.func14):
+ (Func2.prototype.func15):
+ (func16.func17):
+ (func16.func18):
+ (func16.func19):
+ (func16):
+
+2012-01-08 David Levin <levin@chromium.org>
+
+ [chromium] Add layout test support for autosize code in FrameView.
+ https://bugs.webkit.org/show_bug.cgi?id=73631
+
+ Reviewed by Dmitry Titov.
+
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController): Expose the new autoresize method.
+ (LayoutTestController::reset): Set the autoresize mode back to false.
+ (LayoutTestController::enableAutoResizeMode): A way to turn on autoresizing from javascript code in DumpRenderTree.
+ * DumpRenderTree/chromium/LayoutTestController.h:
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::didAutoResize): Handle the autoresize callback so that the outer bounds change appropriately.
+ * DumpRenderTree/chromium/WebViewHost.h:
+
+2012-01-07 Zan Dobersek <zandobersek@gmail.com>
+
+ [WK2][GTK] Each test takes roughly half a second to load
+ https://bugs.webkit.org/show_bug.cgi?id=70699
+
+ Reviewed by Martin Robinson.
+
+ Set the XDG_CACHE_HOME environment variable when testing with
+ WebKitTestRunner. This way the testing is started with a non-existing
+ application cache. If the cache exists and is not empty, the emptying
+ and vacuuming that is performed before every test can consume a lot of
+ time.
+
+ This is just a temporary workaround until it becomes possible to set
+ a desired directory to be used as the application cache location through
+ WebKitWebContext.
+
+ * Scripts/webkitpy/layout_tests/port/gtk.py:
+ (GtkPort.setup_environ_for_server):
+
+2012-01-07 Zan Dobersek <zandobersek@gmail.com>
+
+ [GTK] Enable requestAnimationFrame in build-webkit
+ https://bugs.webkit.org/show_bug.cgi?id=75773
+
+ Reviewed by Martin Robinson.
+
+ Enable requestAnimationFrame for the Gtk port.
+
+ * Scripts/build-webkit:
+
+2012-01-06 Jarred Nicholls <jarred@sencha.com>
+
+ Unreviewed build-webkit fix for Chromium to properly use make if gyp generates Makefiles.
+
+ * Scripts/webkitdirs.pm:
+ (buildChromium):
+ Missing parentheses.
+
+2012-01-06 Simon Fraser <simon.fraser@apple.com>
+
+ Fix DRT build on case-sensitive file systems.
+
+ Fix case of include of WebDynamicScrollBarsView.h
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+
+2012-01-06 Simon Fraser <simon.fraser@apple.com>
+
+ Pixel results from DumpRenderTree and WebKitTestRunner don't match because of colorspace issues
+ https://bugs.webkit.org/show_bug.cgi?id=75662
+
+ Reviewed by Dan Bernstein.
+
+ The pixel results generated by DumpRenderTree and WebKitTestRunner differed because
+ of color profile issues. Fix by keeping everything in device RGB and ensuring that the
+ test window uses the main display's color space, so that the pixel values in the bitmap
+ that gets checksummed are identical to the CSS colors.
+
+ Removed the code that switches the display profile in DRT, since that is no longer required.
+
+ * DumpRenderTree/PixelDumpSupport.h: Remove unused function declarations.
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (crashHandler): Remove code that switches display profiles.
+ (prepareConsistentTestingEnvironment): Ditto.
+ (dumpRenderTree): Ditto.
+ * DumpRenderTree/mac/PixelDumpSupportMac.mm: Ditto.
+ (createBitmapContext): Use DeviceRGB for the bitmap colorspace.
+ (createBitmapContextFromWebView): Add comment about the colorspace handling.
+ * WebKitTestRunner/cg/TestInvocationCG.cpp:
+ (WTR::createCGContextFromImage): Use a RetainPtr, add comment.
+ (WTR::computeMD5HashStringForContext): Simplify the #ifdefs around the braces.
+ * WebKitTestRunner/mac/PlatformWebViewMac.mm:
+ (WTR::PlatformWebView::PlatformWebView): Set the window's colorspace to that of the main display.
+ (WTR::PlatformWebView::windowSnapshotImage): Add comment about colorspaces.
+
+2012-01-06 David Kilzer <ddkilzer@apple.com>
+
+ run-api-tests: specify individual suites and tests on the command-line
+
+ Reviewed by Adam Roben.
+
+ Fixes: <http://webkit.org/b/75065> run-api-tests should be able to run individual suites and tests
+
+ The run-api-tests script will now accept a list of arguments on
+ the command-line that are used as prefix filters. To run all
+ tests in a suite that starts with "WTF" (WTF and WTF_Vector)
+ use:
+
+ $ run-api-tests WTF
+
+ To run only the tests in the "WTF" suite, not the "WTF_Vector"
+ suite, use:
+
+ $ run-api-tests WTF.
+
+ * Scripts/run-api-tests: Filter tests if any prefix arguments
+ are passed on the command-line.
+
+2012-01-06 David Kilzer <ddkilzer@apple.com>
+
+ run-api-tests: change internal representation of tests to array of "SuiteName.TestName" strings
+
+ Reviewed by Adam Roben.
+
+ Part of: <http://webkit.org/b/75065> run-api-tests should be able to run individual suites and tests
+
+ * Scripts/run-api-tests:
+ (dumpTestsBySuite): Update to accept array of tests instead of
+ hash data structure.
+ (runTestsBySuite): Ditto.
+ (listAllTests): Rename from populateTests(). Update to return
+ an array of tests instad of the hash data structure.
+
+2012-01-05 Dirk Pranke <dpranke@chromium.org>
+
+ webkitpy: clean up test/uri conversion routines
+ https://bugs.webkit.org/show_bug.cgi?id=75648
+
+ Reviewed by Eric Seidel.
+
+ This change moves test_to_uri and uri_to_test from the Port
+ class to the Driver class (the routines were only being
+ called by the drivers), and removes a bunch of stale and/or
+ busted logic.
+
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ * Scripts/webkitpy/layout_tests/port/base_unittest.py:
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ * Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
+ * Scripts/webkitpy/layout_tests/port/driver.py:
+ (is_http_test):
+ (test_to_uri):
+ (uri_to_test):
+ * Scripts/webkitpy/layout_tests/port/mock_drt.py:
+ (run_one_test):
+ * Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py:
+ (MockDRTTest.input_line):
+ (input_line):
+ (expected_output):
+ * Scripts/webkitpy/layout_tests/port/test.py:
+ * Scripts/webkitpy/layout_tests/port/webkit.py:
+ (_command_from_driver_input):
+
+2012-01-06 Simon Fraser <simon.fraser@apple.com>
+
+ Mitigate scrollbar differences when running pixel tests
+ https://bugs.webkit.org/show_bug.cgi?id=67217
+
+ Reviewed by Dan Bernstein.
+
+ Add an NSScroller subclass that draws mock scrollbars identically
+ to the WebCore mock scrollbar theme, and register it with the
+ WebDynamicScrollbarsView.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (-[DRTMockScroller rectForPart:]):
+ (-[DRTMockScroller drawKnob]):
+ (-[DRTMockScroller drawRect:]):
+ (registerMockScrollbars):
+ (prepareConsistentTestingEnvironment):
+
+2012-01-05 Jon Lee <jonlee@apple.com>
+
+ Update DRT on Mac to draw resize handles on text areas.
+
+ Reviewed by John Sullivan.
+
+ Enable resize handles on text areas so that we don't have to create two different sets of pixel test results,
+ between WK1 and WK2. This will require rebaselining existing textarea pixel tests.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetDefaultsToConsistentValues):
+
2012-01-06 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Move listing of include paths and libs to pri files in sources
diff --git a/Tools/DumpRenderTree/PixelDumpSupport.h b/Tools/DumpRenderTree/PixelDumpSupport.h
index 87e640243..3bd8820c7 100644
--- a/Tools/DumpRenderTree/PixelDumpSupport.h
+++ b/Tools/DumpRenderTree/PixelDumpSupport.h
@@ -42,14 +42,4 @@ void dumpBitmap(BitmapContext*, const char* checksum);
void dumpWebViewAsPixelsAndCompareWithExpected(const std::string& expectedHash);
void printPNG(const unsigned char* data, const size_t dataLength, const char* checksum);
-#if PLATFORM(MAC)
-
-// Can be used as a signal handler
-void restoreMainDisplayColorProfile(int ignored);
-
-// May change your color space, requiring a call to restoreMainDisplayColorProfile
-void setupMainDisplayColorProfile();
-
-#endif
-
#endif // PixelDumpSupport_h
diff --git a/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp b/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
index f9f6f5a69..24cbf5871 100644
--- a/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
+++ b/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
@@ -56,7 +56,6 @@ static const char optionHardwareAcceleratedGL[] = "--enable-hardware-gpu";
static const char optionEnableThreadedCompositing[] = "--enable-threaded-compositing";
static const char optionForceCompositingMode[] = "--force-compositing-mode";
static const char optionEnableAccelerated2DCanvas[] = "--enable-accelerated-2d-canvas";
-static const char optionEnableLegacyAccelerated2DCanvas[] = "--enable-legacy-accelerated-2d-canvas";
static const char optionEnableAcceleratedPainting[] = "--enable-accelerated-painting";
static const char optionEnableAcceleratedCompositingForVideo[] = "--enable-accelerated-video";
static const char optionEnableCompositeToTexture[] = "--enable-composite-to-texture";
@@ -144,7 +143,6 @@ int main(int argc, char* argv[])
bool compositeToTexture = false;
bool forceCompositingMode = false;
bool accelerated2DCanvasEnabled = false;
- bool legacyAccelerated2DCanvasEnabled = false;
bool acceleratedPaintingEnabled = false;
bool perTilePaintingEnabled = false;
bool stressOpt = false;
@@ -188,8 +186,6 @@ int main(int argc, char* argv[])
forceCompositingMode = true;
else if (argument == optionEnableAccelerated2DCanvas)
accelerated2DCanvasEnabled = true;
- else if (argument == optionEnableLegacyAccelerated2DCanvas)
- legacyAccelerated2DCanvasEnabled = true;
else if (argument == optionEnableAcceleratedPainting)
acceleratedPaintingEnabled = true;
else if (!argument.find(optionUseGraphicsContext3DImplementation)) {
@@ -240,7 +236,6 @@ int main(int argc, char* argv[])
shell.setCompositeToTexture(compositeToTexture);
shell.setForceCompositingMode(forceCompositingMode);
shell.setAccelerated2dCanvasEnabled(accelerated2DCanvasEnabled);
- shell.setLegacyAccelerated2dCanvasEnabled(legacyAccelerated2DCanvasEnabled);
shell.setAcceleratedPaintingEnabled(acceleratedPaintingEnabled);
shell.setPerTilePaintingEnabled(perTilePaintingEnabled);
shell.setJavaScriptFlags(javaScriptFlags);
diff --git a/Tools/DumpRenderTree/chromium/LayoutTestController.cpp b/Tools/DumpRenderTree/chromium/LayoutTestController.cpp
index 7fc21362f..f68e0d872 100644
--- a/Tools/DumpRenderTree/chromium/LayoutTestController.cpp
+++ b/Tools/DumpRenderTree/chromium/LayoutTestController.cpp
@@ -116,6 +116,7 @@ LayoutTestController::LayoutTestController(TestShell* shell)
bindMethod("dumpPermissionClientCallbacks", &LayoutTestController::dumpPermissionClientCallbacks);
bindMethod("dumpCreateView", &LayoutTestController::dumpCreateView);
bindMethod("elementDoesAutoCompleteForElementWithId", &LayoutTestController::elementDoesAutoCompleteForElementWithId);
+ bindMethod("enableAutoResizeMode", &LayoutTestController::enableAutoResizeMode);
bindMethod("evaluateInWebInspector", &LayoutTestController::evaluateInWebInspector);
bindMethod("evaluateScriptInIsolatedWorld", &LayoutTestController::evaluateScriptInIsolatedWorld);
bindMethod("setIsolatedWorldSecurityOrigin", &LayoutTestController::setIsolatedWorldSecurityOrigin);
@@ -608,6 +609,8 @@ void LayoutTestController::reset()
m_shell->webView()->setSelectionColors(0xff1e90ff, 0xff000000, 0xffc8c8c8, 0xff323232);
#endif
m_shell->webView()->removeAllUserContent();
+ WebKit::WebSize empty;
+ m_shell->webView()->enableAutoResizeMode(false, empty, empty);
}
m_dumpAsText = false;
m_dumpAsAudio = false;
@@ -1098,6 +1101,24 @@ void LayoutTestController::elementDoesAutoCompleteForElementWithId(const CppArgu
result->set(elementDoesAutoCompleteForElementWithId(elementId));
}
+void LayoutTestController::enableAutoResizeMode(const CppArgumentList& arguments, CppVariant* result)
+{
+ if (arguments.size() != 4) {
+ result->set(false);
+ return;
+ }
+ int minWidth = cppVariantToInt32(arguments[0]);
+ int minHeight = cppVariantToInt32(arguments[1]);
+ WebKit::WebSize minSize(minWidth, minHeight);
+
+ int maxWidth = cppVariantToInt32(arguments[2]);
+ int maxHeight = cppVariantToInt32(arguments[3]);
+ WebKit::WebSize maxSize(maxWidth, maxHeight);
+
+ m_shell->webView()->enableAutoResizeMode(true, minSize, maxSize);
+ result->set(true);
+}
+
void LayoutTestController::numberOfActiveAnimations(const CppArgumentList&, CppVariant* result)
{
result->set(numberOfActiveAnimations());
diff --git a/Tools/DumpRenderTree/chromium/LayoutTestController.h b/Tools/DumpRenderTree/chromium/LayoutTestController.h
index 71b1b4226..603b3b92e 100644
--- a/Tools/DumpRenderTree/chromium/LayoutTestController.h
+++ b/Tools/DumpRenderTree/chromium/LayoutTestController.h
@@ -243,6 +243,7 @@ public:
void pauseAnimationAtTimeOnElementWithId(const CppArgumentList&, CppVariant*);
void pauseTransitionAtTimeOnElementWithId(const CppArgumentList&, CppVariant*);
void elementDoesAutoCompleteForElementWithId(const CppArgumentList&, CppVariant*);
+ void enableAutoResizeMode(const CppArgumentList&, CppVariant*);
void numberOfActiveAnimations(const CppArgumentList&, CppVariant*);
void suspendAnimations(const CppArgumentList&, CppVariant*);
void resumeAnimations(const CppArgumentList&, CppVariant*);
diff --git a/Tools/DumpRenderTree/chromium/TestShell.cpp b/Tools/DumpRenderTree/chromium/TestShell.cpp
index f15cb444a..15a93890f 100644
--- a/Tools/DumpRenderTree/chromium/TestShell.cpp
+++ b/Tools/DumpRenderTree/chromium/TestShell.cpp
@@ -111,7 +111,6 @@ TestShell::TestShell(bool testShellMode)
, m_compositeToTexture(false)
, m_forceCompositingMode(false)
, m_accelerated2dCanvasEnabled(false)
- , m_legacyAccelerated2dCanvasEnabled(false)
, m_acceleratedPaintingEnabled(false)
, m_perTilePaintingEnabled(false)
, m_stressOpt(false)
@@ -219,7 +218,6 @@ void TestShell::resetWebSettings(WebView& webView)
m_prefs.compositeToTexture = m_compositeToTexture;
m_prefs.forceCompositingMode = m_forceCompositingMode;
m_prefs.accelerated2dCanvasEnabled = m_accelerated2dCanvasEnabled;
- m_prefs.legacyAccelerated2dCanvasEnabled = m_legacyAccelerated2dCanvasEnabled;
m_prefs.acceleratedPaintingEnabled = m_acceleratedPaintingEnabled;
m_prefs.perTilePaintingEnabled = m_perTilePaintingEnabled;
m_prefs.applyTo(&webView);
diff --git a/Tools/DumpRenderTree/chromium/TestShell.h b/Tools/DumpRenderTree/chromium/TestShell.h
index a095ef2d0..406fa7459 100644
--- a/Tools/DumpRenderTree/chromium/TestShell.h
+++ b/Tools/DumpRenderTree/chromium/TestShell.h
@@ -136,7 +136,6 @@ public:
void setCompositeToTexture(bool enabled) { m_compositeToTexture = enabled; }
void setForceCompositingMode(bool enabled) { m_forceCompositingMode = enabled; }
void setAccelerated2dCanvasEnabled(bool enabled) { m_accelerated2dCanvasEnabled = enabled; }
- void setLegacyAccelerated2dCanvasEnabled(bool enabled) { m_legacyAccelerated2dCanvasEnabled = enabled; }
void setAcceleratedPaintingEnabled(bool enabled) { m_acceleratedPaintingEnabled = enabled; }
void setPerTilePaintingEnabled(bool enabled) { m_perTilePaintingEnabled = enabled; }
#if defined(OS_WIN)
@@ -226,7 +225,6 @@ private:
bool m_compositeToTexture;
bool m_forceCompositingMode;
bool m_accelerated2dCanvasEnabled;
- bool m_legacyAccelerated2dCanvasEnabled;
bool m_acceleratedPaintingEnabled;
bool m_perTilePaintingEnabled;
WebPreferences m_prefs;
diff --git a/Tools/DumpRenderTree/chromium/WebPreferences.cpp b/Tools/DumpRenderTree/chromium/WebPreferences.cpp
index 01e4fcc4e..f90a1d070 100644
--- a/Tools/DumpRenderTree/chromium/WebPreferences.cpp
+++ b/Tools/DumpRenderTree/chromium/WebPreferences.cpp
@@ -112,7 +112,6 @@ void WebPreferences::reset()
acceleratedCompositingEnabled = false;
compositeToTexture = false;
accelerated2dCanvasEnabled = false;
- legacyAccelerated2dCanvasEnabled = false;
acceleratedPaintingEnabled = false;
forceCompositingMode = false;
hixie76WebSocketProtocolEnabled = true;
@@ -218,7 +217,6 @@ void WebPreferences::applyTo(WebView* webView)
settings->setCompositeToTextureEnabled(compositeToTexture);
settings->setForceCompositingMode(forceCompositingMode);
settings->setAccelerated2dCanvasEnabled(accelerated2dCanvasEnabled);
- settings->setLegacyAccelerated2dCanvasEnabled(legacyAccelerated2dCanvasEnabled);
settings->setAcceleratedPaintingEnabled(acceleratedPaintingEnabled);
settings->setHixie76WebSocketProtocolEnabled(hixie76WebSocketProtocolEnabled);
settings->setPerTilePaintingEnabled(perTilePaintingEnabled);
diff --git a/Tools/DumpRenderTree/chromium/WebPreferences.h b/Tools/DumpRenderTree/chromium/WebPreferences.h
index 2e2135ab7..d39abfb6c 100644
--- a/Tools/DumpRenderTree/chromium/WebPreferences.h
+++ b/Tools/DumpRenderTree/chromium/WebPreferences.h
@@ -106,7 +106,6 @@ struct WebPreferences {
bool compositeToTexture;
bool forceCompositingMode;
bool accelerated2dCanvasEnabled;
- bool legacyAccelerated2dCanvasEnabled;
bool acceleratedPaintingEnabled;
bool hixie76WebSocketProtocolEnabled;
bool perTilePaintingEnabled;
diff --git a/Tools/DumpRenderTree/chromium/WebViewHost.cpp b/Tools/DumpRenderTree/chromium/WebViewHost.cpp
index 1b0687dd0..5d378ba5b 100644
--- a/Tools/DumpRenderTree/chromium/WebViewHost.cpp
+++ b/Tools/DumpRenderTree/chromium/WebViewHost.cpp
@@ -709,6 +709,13 @@ void WebViewHost::didScrollRect(int, int, const WebRect& clipRect)
didInvalidateRect(clipRect);
}
+void WebViewHost::didAutoResize(const WebSize& newSize)
+{
+ // Purposely don't include the virtualWindowBorder in this case so that
+ // window.inner[Width|Height] is the same as window.outer[Width|Height]
+ setWindowRect(WebRect(0, 0, newSize.width, newSize.height));
+}
+
void WebViewHost::scheduleComposite()
{
WebSize widgetSize = webWidget()->size();
diff --git a/Tools/DumpRenderTree/chromium/WebViewHost.h b/Tools/DumpRenderTree/chromium/WebViewHost.h
index 0bc4c38e6..8323fd8c9 100644
--- a/Tools/DumpRenderTree/chromium/WebViewHost.h
+++ b/Tools/DumpRenderTree/chromium/WebViewHost.h
@@ -154,6 +154,7 @@ class WebViewHost : public WebKit::WebSpellCheckClient, public WebKit::WebViewCl
// WebKit::WebWidgetClient
virtual void didInvalidateRect(const WebKit::WebRect&);
virtual void didScrollRect(int dx, int dy, const WebKit::WebRect&);
+ virtual void didAutoResize(const WebKit::WebSize& newSize);
virtual void scheduleComposite();
#if ENABLE(REQUEST_ANIMATION_FRAME)
virtual void scheduleAnimation();
diff --git a/Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp b/Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
index ad5df14c9..fe69b8534 100644
--- a/Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
+++ b/Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
@@ -259,7 +259,14 @@ JSStringRef AccessibilityUIElement::language()
JSStringRef AccessibilityUIElement::helpText() const
{
- return 0;
+ if (!m_element)
+ return JSStringCreateWithCharacters(0, 0);
+
+ ASSERT(ATK_IS_OBJECT(m_element));
+
+ CString helpText = DumpRenderTreeSupportGtk::accessibilityHelpText(ATK_OBJECT(m_element));
+ GOwnPtr<gchar> axHelpText(g_strdup_printf("AXHelp: %s", helpText.data()));
+ return JSStringCreateWithUTF8CString(axHelpText.get());
}
double AccessibilityUIElement::x()
diff --git a/Tools/DumpRenderTree/mac/DumpRenderTree.mm b/Tools/DumpRenderTree/mac/DumpRenderTree.mm
index b25fa2a61..0bc46e1ad 100644
--- a/Tools/DumpRenderTree/mac/DumpRenderTree.mm
+++ b/Tools/DumpRenderTree/mac/DumpRenderTree.mm
@@ -68,6 +68,7 @@
#import <WebKit/WebDatabaseManagerPrivate.h>
#import <WebKit/WebDocumentPrivate.h>
#import <WebKit/WebDeviceOrientationProviderMock.h>
+#import <WebKit/WebDynamicScrollBarsView.h>
#import <WebKit/WebEditingDelegate.h>
#import <WebKit/WebFrameView.h>
#import <WebKit/WebHistory.h>
@@ -439,6 +440,68 @@ static void adjustFonts()
activateTestingFonts();
}
+@interface DRTMockScroller : NSScroller
+@end
+
+@implementation DRTMockScroller
+
+- (NSRect)rectForPart:(NSScrollerPart)partCode
+{
+ switch (partCode) {
+ case NSScrollerKnob: {
+ NSRect frameRect = [self frame];
+ NSRect bounds = [self bounds];
+ BOOL isHorizontal = frameRect.size.width > frameRect.size.height;
+ CGFloat trackLength = isHorizontal ? bounds.size.width : bounds.size.height;
+ CGFloat minKnobSize = isHorizontal ? bounds.size.height : bounds.size.width;
+ CGFloat knobLength = max(minKnobSize, static_cast<CGFloat>(round(trackLength * [self knobProportion])));
+ CGFloat knobPosition = static_cast<CGFloat>((round([self doubleValue] * (trackLength - knobLength))));
+
+ if (isHorizontal)
+ return NSMakeRect(bounds.origin.x + knobPosition, bounds.origin.y, knobLength, bounds.size.height);
+
+ return NSMakeRect(bounds.origin.x, bounds.origin.y + + knobPosition, bounds.size.width, knobLength);
+ }
+ }
+
+ return [super rectForPart:partCode];
+}
+
+- (void)drawKnob
+{
+ if (![self isEnabled])
+ return;
+
+ NSRect knobRect = [self rectForPart:NSScrollerKnob];
+
+ static NSColor *knobColor = [[NSColor colorWithDeviceRed:0x80 / 255.0 green:0x80 / 255.0 blue:0x80 / 255.0 alpha:1] retain];
+ [knobColor set];
+
+ NSRectFill(knobRect);
+}
+
+- (void)drawRect:(NSRect)dirtyRect
+{
+ static NSColor *trackColor = [[NSColor colorWithDeviceRed:0xC0 / 255.0 green:0xC0 / 255.0 blue:0xC0 / 255.0 alpha:1] retain];
+ static NSColor *disabledTrackColor = [[NSColor colorWithDeviceRed:0xE0 / 255.0 green:0xE0 / 255.0 blue:0xE0 / 255.0 alpha:1] retain];
+
+ if ([self isEnabled])
+ [trackColor set];
+ else
+ [disabledTrackColor set];
+
+ NSRectFill(dirtyRect);
+
+ [self drawKnob];
+}
+
+@end
+
+static void registerMockScrollbars()
+{
+ [WebDynamicScrollBarsView setCustomScrollerClass:[DRTMockScroller class]];
+}
+
WebView *createWebViewAndOffscreenWindow()
{
NSRect rect = NSMakeRect(0, 0, LayoutTestController::maxViewWidth, LayoutTestController::maxViewHeight);
@@ -555,6 +618,7 @@ static void resetDefaultsToConsistentValues()
[preferences setXSSAuditorEnabled:NO];
[preferences setExperimentalNotificationsEnabled:NO];
[preferences setPlugInsEnabled:YES];
+ [preferences setTextAreasAreResizable:YES];
[preferences setPrivateBrowsingEnabled:NO];
[preferences setAuthorAndUserStylesEnabled:YES];
@@ -643,7 +707,6 @@ static void crashHandler(int sig)
char *signalName = strsignal(sig);
write(STDERR_FILENO, signalName, strlen(signalName));
write(STDERR_FILENO, "\n", 1);
- restoreMainDisplayColorProfile(0);
exit(128 + sig);
}
@@ -752,9 +815,8 @@ static void prepareConsistentTestingEnvironment()
setDefaultsToConsistentValuesForTesting();
adjustFonts();
+ registerMockScrollbars();
- if (dumpPixels)
- setupMainDisplayColorProfile();
allocateGlobalControllers();
makeLargeMallocFailSilently();
@@ -822,9 +884,6 @@ void dumpRenderTree(int argc, const char *argv[])
CFRelease(disallowedURLs);
disallowedURLs = 0;
}
-
- if (dumpPixels)
- restoreMainDisplayColorProfile(0);
}
int main(int argc, const char *argv[])
diff --git a/Tools/DumpRenderTree/mac/PixelDumpSupportMac.mm b/Tools/DumpRenderTree/mac/PixelDumpSupportMac.mm
index 3d6fbdd59..eaef0d523 100644
--- a/Tools/DumpRenderTree/mac/PixelDumpSupportMac.mm
+++ b/Tools/DumpRenderTree/mac/PixelDumpSupportMac.mm
@@ -44,63 +44,6 @@
#import <WebKit/WebKit.h>
#import <WebKit/WebViewPrivate.h>
-
-// To ensure pixel tests consistency, we need to always render in the same colorspace.
-// Unfortunately, because of AppKit / WebKit constraints, we can't render directly in the colorspace of our choice.
-// This implies we have to temporarily change the profile of the main display to the colorspace we want to render into.
-// We also need to make sure the CGBitmapContext we return is in that same colorspace.
-
-#define PROFILE_PATH "/System/Library/ColorSync/Profiles/Generic RGB Profile.icc" // FIXME: This cannot be more than CS_MAX_PATH (256 characters)
-
-static CMProfileLocation sInitialProfileLocation; // The locType field is initialized to 0 which is the same as cmNoProfileBase
-
-void restoreMainDisplayColorProfile(int ignored)
-{
- // This is used as a signal handler, and thus the calls into ColorSync are unsafe
- // But we might as well try to restore the user's color profile, we're going down anyway...
- if (sInitialProfileLocation.locType != cmNoProfileBase) {
- const CMDeviceScope scope = { kCFPreferencesCurrentUser, kCFPreferencesCurrentHost };
- int error = CMSetDeviceProfile(cmDisplayDeviceClass, (CMDeviceID)kCGDirectMainDisplay, &scope, cmDefaultProfileID, &sInitialProfileLocation);
- if (error)
- fprintf(stderr, "Failed to restore initial color profile for main display! Open System Preferences > Displays > Color and manually re-select the profile. (Error: %i)\n", error);
- sInitialProfileLocation.locType = cmNoProfileBase;
- }
-}
-
-void setupMainDisplayColorProfile()
-{
- const CMDeviceScope scope = { kCFPreferencesCurrentUser, kCFPreferencesCurrentHost };
- int error;
-
- CMProfileRef profile = 0;
- error = CMGetProfileByAVID((CMDisplayIDType)kCGDirectMainDisplay, &profile);
- if (!error) {
- UInt32 size = sizeof(CMProfileLocation);
- error = NCMGetProfileLocation(profile, &sInitialProfileLocation, &size);
- CMCloseProfile(profile);
- }
- if (error) {
- fprintf(stderr, "Failed to retrieve current color profile for main display, thus it won't be changed. Many pixel tests may fail as a result. (Error: %i)\n", error);
- sInitialProfileLocation.locType = cmNoProfileBase;
- return;
- }
-
- CMProfileLocation location;
- location.locType = cmPathBasedProfile;
- strcpy(location.u.pathLoc.path, PROFILE_PATH);
- error = CMSetDeviceProfile(cmDisplayDeviceClass, (CMDeviceID)kCGDirectMainDisplay, &scope, cmDefaultProfileID, &location);
- if (error) {
- fprintf(stderr, "Failed to set color profile for main display! Many pixel tests may fail as a result. (Error: %i)\n", error);
- sInitialProfileLocation.locType = cmNoProfileBase;
- return;
- }
-
- // Other signals are handled in installSignalHandlers() which also calls restoreMainDisplayColorProfile()
- signal(SIGINT, restoreMainDisplayColorProfile);
- signal(SIGHUP, restoreMainDisplayColorProfile);
- signal(SIGTERM, restoreMainDisplayColorProfile);
-}
-
static PassRefPtr<BitmapContext> createBitmapContext(size_t pixelsWide, size_t pixelsHigh, size_t& rowBytes, void*& buffer)
{
rowBytes = (4 * pixelsWide + 63) & ~63; // Use a multiple of 64 bytes to improve CG performance
@@ -109,19 +52,9 @@ static PassRefPtr<BitmapContext> createBitmapContext(size_t pixelsWide, size_t p
if (!buffer)
return 0;
- static CGColorSpaceRef colorSpace = 0;
- if (!colorSpace) {
- CMProfileLocation location;
- location.locType = cmPathBasedProfile;
- strcpy(location.u.pathLoc.path, PROFILE_PATH);
- CMProfileRef profile;
- if (CMOpenProfile(&profile, &location) == noErr) {
- colorSpace = CGColorSpaceCreateWithPlatformColorSpace(profile);
- CMCloseProfile(profile);
- }
- }
-
- CGContextRef context = CGBitmapContextCreate(buffer, pixelsWide, pixelsHigh, 8, rowBytes, colorSpace, kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host); // Use ARGB8 on PPC or BGRA8 on X86 to improve CG performance
+ // Creating this bitmap in the device color space prevents any color conversion when the image of the web view is drawn into it.
+ RetainPtr<CGColorSpaceRef> colorSpace(AdoptCF, CGColorSpaceCreateDeviceRGB());
+ CGContextRef context = CGBitmapContextCreate(buffer, pixelsWide, pixelsHigh, 8, rowBytes, colorSpace.get(), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host); // Use ARGB8 on PPC or BGRA8 on X86 to improve CG performance
if (!context) {
free(buffer);
return 0;
@@ -207,7 +140,7 @@ PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool onscreen, bool inc
[view display];
// Ask the window server to provide us a composited version of the *real* window content including surfaces (i.e. OpenGL content)
- // Note that the returned image might differ very slightly from the window backing because of dithering artifacts in the window server compositor
+ // Note that the returned image might differ very slightly from the window backing because of dithering artifacts in the window server compositor.
CGImageRef image = CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, [[view window] windowNumber], kCGWindowImageBoundsIgnoreFraming | kCGWindowImageShouldBeOpaque);
CGContextDrawImage(context, CGRectMake(0, 0, CGImageGetWidth(image), CGImageGetHeight(image)), image);
CGImageRelease(image);
diff --git a/Tools/DumpRenderTree/qt/DumpRenderTree.pro b/Tools/DumpRenderTree/qt/DumpRenderTree.pro
index 772cb35d5..c12c3f7c3 100644
--- a/Tools/DumpRenderTree/qt/DumpRenderTree.pro
+++ b/Tools/DumpRenderTree/qt/DumpRenderTree.pro
@@ -10,7 +10,6 @@ TARGET = DumpRenderTree
DESTDIR = $$ROOT_BUILD_DIR/bin
load(features)
-CONFIG += uitools
WEBKIT += wtf webcore
diff --git a/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp b/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
index c1a3ed450..909aa6870 100644
--- a/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
+++ b/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
@@ -49,6 +49,7 @@
#include <QFileInfo>
#include <QFocusEvent>
#include <QFontDatabase>
+#include <QLabel>
#include <QLocale>
#include <QNetworkAccessManager>
#include <QNetworkReply>
@@ -58,16 +59,13 @@
#ifndef QT_NO_PRINTER
#include <QPrinter>
#endif
+#include <QProgressBar>
#include <QUndoStack>
#include <QUrl>
#include <qwebsettings.h>
#include <qwebsecurityorigin.h>
-#ifndef QT_NO_UITOOLS
-#include <QtUiTools/QUiLoader>
-#endif
-
#if HAVE(FONTCONFIG)
#include <fontconfig/fontconfig.h>
#endif
@@ -363,13 +361,13 @@ QObject* WebPage::createPlugin(const QString& classId, const QUrl& url, const QS
Q_UNUSED(url);
Q_UNUSED(paramNames);
Q_UNUSED(paramValues);
-#ifndef QT_NO_UITOOLS
- QUiLoader loader;
- return loader.createWidget(classId, view());
-#else
- Q_UNUSED(classId);
+
+ if (classId == QLatin1String("QProgressBar"))
+ return new QProgressBar(view());
+ if (classId == QLatin1String("QLabel"))
+ return new QLabel(view());
+
return 0;
-#endif
}
void WebPage::setViewGeometry(const QRect& rect)
diff --git a/Tools/DumpRenderTree/qt/fonts.conf b/Tools/DumpRenderTree/qt/fonts.conf
index 3540c479f..09507d425 100644
--- a/Tools/DumpRenderTree/qt/fonts.conf
+++ b/Tools/DumpRenderTree/qt/fonts.conf
@@ -38,6 +38,23 @@
</edit>
</match>
+<!--
+ If the font still has no generic name, add sans-serif
+ -->
+ <match target="pattern">
+ <test qual="all" name="family" compare="not_eq">
+ <string>sans-serif</string>
+ </test>
+ <test qual="all" name="family" compare="not_eq">
+ <string>serif</string>
+ </test>
+ <test qual="all" name="family" compare="not_eq">
+ <string>monospace</string>
+ </test>
+ <edit name="family" mode="append_last">
+ <string>sans-serif</string>
+ </edit>
+ </match>
<config>
<!--
diff --git a/Tools/MiniBrowser/gtk/GNUmakefile.am b/Tools/MiniBrowser/gtk/GNUmakefile.am
index cf3994a57..8a3b87e0f 100644
--- a/Tools/MiniBrowser/gtk/GNUmakefile.am
+++ b/Tools/MiniBrowser/gtk/GNUmakefile.am
@@ -58,4 +58,5 @@ stamp-mini-browser-marshal.h: $(MiniBrowser_marshal_list)
echo timestamp > $(@F)
EXTRA_DIST += \
- $(minibrowser_marshal_list)
+ $(srcdir)/Tools/MiniBrowser/gtk/browser-marshal.list
+
diff --git a/Tools/MiniBrowser/qt/BrowserWindow.cpp b/Tools/MiniBrowser/qt/BrowserWindow.cpp
index 29bf58aee..9ccb8a263 100644
--- a/Tools/MiniBrowser/qt/BrowserWindow.cpp
+++ b/Tools/MiniBrowser/qt/BrowserWindow.cpp
@@ -76,6 +76,16 @@ void BrowserWindow::load(const QString& url)
QMetaObject::invokeMethod(rootObject(), "load", Qt::DirectConnection, Q_ARG(QVariant, completedUrl));
}
+void BrowserWindow::reload()
+{
+ QMetaObject::invokeMethod(rootObject(), "reload", Qt::DirectConnection);
+}
+
+void BrowserWindow::focusAddressBar()
+{
+ QMetaObject::invokeMethod(rootObject(), "focusAddressBar", Qt::DirectConnection);
+}
+
BrowserWindow* BrowserWindow::newWindow(const QString& url)
{
BrowserWindow* window = new BrowserWindow();
diff --git a/Tools/MiniBrowser/qt/BrowserWindow.h b/Tools/MiniBrowser/qt/BrowserWindow.h
index e697c7548..9593e1014 100644
--- a/Tools/MiniBrowser/qt/BrowserWindow.h
+++ b/Tools/MiniBrowser/qt/BrowserWindow.h
@@ -42,6 +42,8 @@ public:
BrowserWindow(WindowOptions* = 0);
~BrowserWindow();
void load(const QString& url);
+ void reload();
+ void focusAddressBar();
QQuickWebView* webView() const;
void updateVisualMockTouchPoints(const QList<QWindowSystemInterface::TouchPoint>& touchPoints);
diff --git a/Tools/MiniBrowser/qt/MiniBrowser.qrc b/Tools/MiniBrowser/qt/MiniBrowser.qrc
index b50609398..20a9400c6 100644
--- a/Tools/MiniBrowser/qt/MiniBrowser.qrc
+++ b/Tools/MiniBrowser/qt/MiniBrowser.qrc
@@ -5,6 +5,7 @@
<file>icons/previous.png</file>
<file>icons/refresh.png</file>
<file>icons/stop.png</file>
+ <file>icons/touch.png</file>
<file>icons/touchpoint.png</file>
<file>qml/AlertDialog.qml</file>
<file>qml/BrowserWindow.qml</file>
diff --git a/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp b/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp
index 0ea3c3b78..265436505 100644
--- a/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp
+++ b/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp
@@ -63,12 +63,12 @@ static inline bool isMouseEvent(const QEvent* event)
MiniBrowserApplication::MiniBrowserApplication(int& argc, char** argv)
: QApplication(argc, argv)
- , m_windowOptions(this)
, m_realTouchEventReceived(false)
, m_pendingFakeTouchEventCount(0)
, m_isRobotized(false)
, m_robotTimeoutSeconds(0)
, m_robotExtraTimeSeconds(0)
+ , m_windowOptions(this)
{
setOrganizationName("Nokia");
setApplicationName("QtMiniBrowser");
@@ -82,7 +82,7 @@ bool MiniBrowserApplication::notify(QObject* target, QEvent* event)
// We try to be smart, if we received real touch event, we are probably on a device
// with touch screen, and we should not have touch mocking.
- if (!event->spontaneous() || m_realTouchEventReceived)
+ if (!event->spontaneous() || m_realTouchEventReceived || !m_windowOptions.touchMockingEnabled())
return QApplication::notify(target, event);
if (isTouchEvent(event) && static_cast<QTouchEvent*>(event)->deviceType() == QTouchEvent::TouchScreen) {
@@ -97,6 +97,21 @@ bool MiniBrowserApplication::notify(QObject* target, QEvent* event)
if (!browserWindow)
return QApplication::notify(target, event);
+ // In QML events are propagated through parents. But since the WebView
+ // may consume key events, a shortcut might never reach the top QQuickItem.
+ // Therefore we are checking here for shortcuts.
+ if (event->type() == QEvent::KeyPress) {
+ QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event);
+ if ((keyEvent->key() == Qt::Key_R && keyEvent->modifiers() == Qt::ControlModifier) || keyEvent->key() == Qt::Key_F5) {
+ browserWindow->reload();
+ return true;
+ }
+ if ((keyEvent->key() == Qt::Key_L && keyEvent->modifiers() == Qt::ControlModifier) || keyEvent->key() == Qt::Key_F6) {
+ browserWindow->focusAddressBar();
+ return true;
+ }
+ }
+
if (event->type() == QEvent::KeyRelease && static_cast<QKeyEvent*>(event)->key() == Qt::Key_Control) {
foreach (int id, m_heldTouchPoints)
if (m_touchPoints.contains(id))
diff --git a/Tools/MiniBrowser/qt/MiniBrowserApplication.h b/Tools/MiniBrowser/qt/MiniBrowserApplication.h
index 719c79de6..43f83cfe1 100644
--- a/Tools/MiniBrowser/qt/MiniBrowserApplication.h
+++ b/Tools/MiniBrowser/qt/MiniBrowserApplication.h
@@ -45,6 +45,7 @@ class WindowOptions : public QObject {
Q_PROPERTY(bool printLoadedUrls READ printLoadedUrls)
Q_PROPERTY(bool useTraditionalDesktopBehavior READ useTraditionalDesktopBehavior)
Q_PROPERTY(bool startMaximized READ startMaximized)
+ Q_PROPERTY(bool touchMockingEnabled READ touchMockingEnabled WRITE setTouchMockingEnabled NOTIFY touchMockingEnabledChanged)
public:
WindowOptions(QObject* parent = 0)
@@ -52,6 +53,7 @@ public:
, m_printLoadedUrls(false)
, m_useTraditionalDesktopBehavior(false)
, m_startMaximized(false)
+ , m_touchMockingEnabled(true)
, m_windowSize(QSize(980, 735))
{
}
@@ -66,12 +68,24 @@ public:
bool startFullScreen() const { return m_startFullScreen; }
void setRequestedWindowSize(const QSize& size) { m_windowSize = size; }
QSize requestedWindowSize() const { return m_windowSize; }
+ bool touchMockingEnabled() const { return m_touchMockingEnabled; }
+ void setTouchMockingEnabled(bool enabled)
+ {
+ if (enabled != m_touchMockingEnabled) {
+ m_touchMockingEnabled = enabled;
+ emit touchMockingEnabledChanged();
+ }
+ }
+
+signals:
+ void touchMockingEnabledChanged();
private:
bool m_printLoadedUrls;
bool m_useTraditionalDesktopBehavior;
bool m_startMaximized;
bool m_startFullScreen;
+ bool m_touchMockingEnabled;
QSize m_windowSize;
};
@@ -84,8 +98,7 @@ public:
bool isRobotized() const { return m_isRobotized; }
int robotTimeout() const { return m_robotTimeoutSeconds; }
int robotExtraTime() const { return m_robotExtraTimeSeconds; }
-
- WindowOptions m_windowOptions;
+ WindowOptions* windowOptions() { return &m_windowOptions; }
virtual bool notify(QObject*, QEvent*);
@@ -103,6 +116,8 @@ private:
QHash<int, QWindowSystemInterface::TouchPoint> m_touchPoints;
QSet<int> m_heldTouchPoints;
+
+ WindowOptions m_windowOptions;
};
QML_DECLARE_TYPE(WindowOptions);
diff --git a/Tools/MiniBrowser/qt/icons/touch.png b/Tools/MiniBrowser/qt/icons/touch.png
new file mode 100644
index 000000000..182ae0fe8
--- /dev/null
+++ b/Tools/MiniBrowser/qt/icons/touch.png
Binary files differ
diff --git a/Tools/MiniBrowser/qt/main.cpp b/Tools/MiniBrowser/qt/main.cpp
index 26877ae77..feae14ade 100644
--- a/Tools/MiniBrowser/qt/main.cpp
+++ b/Tools/MiniBrowser/qt/main.cpp
@@ -45,7 +45,7 @@ int main(int argc, char** argv)
MiniBrowserApplication app(argc, argv);
if (app.isRobotized()) {
- BrowserWindow* window = new BrowserWindow(&app.m_windowOptions);
+ BrowserWindow* window = new BrowserWindow(app.windowOptions());
UrlLoader loader(window, app.urls().at(0), app.robotTimeout(), app.robotExtraTime());
loader.loadNext();
window->show();
@@ -62,7 +62,7 @@ int main(int argc, char** argv)
urls.append("http://www.google.com");
}
- BrowserWindow* window = new BrowserWindow(&app.m_windowOptions);
+ BrowserWindow* window = new BrowserWindow(app.windowOptions());
window->load(urls.at(0));
for (int i = 1; i < urls.size(); ++i)
diff --git a/Tools/MiniBrowser/qt/qml/BrowserWindow.qml b/Tools/MiniBrowser/qt/qml/BrowserWindow.qml
index 0d73dceca..c2c673aa1 100644
--- a/Tools/MiniBrowser/qt/qml/BrowserWindow.qml
+++ b/Tools/MiniBrowser/qt/qml/BrowserWindow.qml
@@ -41,6 +41,10 @@ Rectangle {
webView.load(address)
}
+ function reload() {
+ webView.reload()
+ }
+
function focusAddressBar() {
addressLine.forceActiveFocus()
addressLine.selectAll()
@@ -151,11 +155,9 @@ Rectangle {
onReleased: { parent.color = "#efefef" }
onClicked: {
if (webView.loading) {
- console.log("stop loading")
webView.stop()
} else {
- console.log("reloading")
- webView.reload()
+ reload()
}
}
}
@@ -180,6 +182,33 @@ Rectangle {
}
}
}
+
+ Rectangle {
+ id: touchEventsButton
+ height: parent.height
+ width: height
+ color: "#efefef"
+ radius: 6
+
+ Image {
+ anchors.centerIn: parent
+ opacity: options.touchMockingEnabled ? 0.6 : 0.1
+ source: "../icons/touch.png"
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ if (options.touchMockingEnabled) {
+ console.log("Touch Mocking Disabled")
+ } else {
+ console.log("Touch Mocking Enabled")
+ }
+
+ options.touchMockingEnabled = !options.touchMockingEnabled
+ }
+ }
+ }
}
Rectangle {
color: "white"
@@ -234,13 +263,6 @@ Rectangle {
console.log("going to: ", addressLine.text)
webView.load(utils.urlFromUserInput(addressLine.text))
}
-
- Keys.onPressed: {
- if (((event.modifiers & Qt.ControlModifier) && event.key == Qt.Key_L) || event.key == Qt.key_F6) {
- focusAddressBar()
- event.accepted = true
- }
- }
}
}
}
@@ -279,11 +301,4 @@ Rectangle {
visible: false
viewportInfo : webView.experimental.viewportInfo
}
-
- Keys.onPressed: {
- if (((event.modifiers & Qt.ControlModifier) && event.key == Qt.Key_L) || event.key == Qt.key_F6) {
- focusAddressBar()
- event.accepted = true
- }
- }
}
diff --git a/Tools/MiniBrowser/win/BrowserView.cpp b/Tools/MiniBrowser/win/BrowserView.cpp
index fdf076e9c..bd5dcba65 100644
--- a/Tools/MiniBrowser/win/BrowserView.cpp
+++ b/Tools/MiniBrowser/win/BrowserView.cpp
@@ -152,8 +152,10 @@ void BrowserView::setFrame(RECT rect)
void BrowserView::goToURL(const std::wstring& urlString)
{
CFStringRef string = CFStringCreateWithCharacters(0, (const UniChar*)urlString.data(), urlString.size());
- CFURLRef cfURL = CFURLCreateWithString(0, string, 0);
+ CFStringRef escapedString = CFURLCreateStringByAddingPercentEscapes(0, string, 0, 0, kCFStringEncodingUTF8);
CFRelease(string);
+ CFURLRef cfURL = CFURLCreateWithString(0, escapedString, 0);
+ CFRelease(escapedString);
WKURLRef url = WKURLCreateWithCFURL(cfURL);
CFRelease(cfURL);
diff --git a/Tools/MiniBrowser/win/BrowserWindow.cpp b/Tools/MiniBrowser/win/BrowserWindow.cpp
index dc43a684e..b791d5bb5 100644
--- a/Tools/MiniBrowser/win/BrowserWindow.cpp
+++ b/Tools/MiniBrowser/win/BrowserWindow.cpp
@@ -251,7 +251,7 @@ bool BrowserWindow::handleMessage(const MSG* message)
std::wstring url(&buffer[0], buffer.size() - 1);
- if (url.find(L"http://"))
+ if (url.find(L":") == std::wstring::npos)
url = L"http://" + url;
m_browserView.goToURL(url);
diff --git a/Tools/QtTestBrowser/QtTestBrowser.pro b/Tools/QtTestBrowser/QtTestBrowser.pro
index 8825b2152..3147ddae0 100644
--- a/Tools/QtTestBrowser/QtTestBrowser.pro
+++ b/Tools/QtTestBrowser/QtTestBrowser.pro
@@ -35,8 +35,6 @@ HEADERS += \
cookiejar.h
-CONFIG += uitools
-
WEBKIT += webcore
CONFIG += qtwebkit
diff --git a/Tools/QtTestBrowser/launcherwindow.h b/Tools/QtTestBrowser/launcherwindow.h
index 94452605a..3495bada8 100644
--- a/Tools/QtTestBrowser/launcherwindow.h
+++ b/Tools/QtTestBrowser/launcherwindow.h
@@ -43,10 +43,6 @@
#include <QPrintPreviewDialog>
#endif
-#ifndef QT_NO_UITOOLS
-#include <QtUiTools/QUiLoader>
-#endif
-
#include <QDebug>
#include <cstdio>
diff --git a/Tools/QtTestBrowser/webpage.cpp b/Tools/QtTestBrowser/webpage.cpp
index 98b7d0a74..a4bc78f8f 100644
--- a/Tools/QtTestBrowser/webpage.cpp
+++ b/Tools/QtTestBrowser/webpage.cpp
@@ -47,6 +47,7 @@
#ifndef QT_NO_LINEEDIT
#include <QLineEdit>
#endif
+#include <QProgressBar>
#include <QtNetwork/QNetworkReply>
#include <QtNetwork/QNetworkRequest>
#include <QtNetwork/QNetworkProxy>
@@ -209,12 +210,10 @@ QObject* WebPage::createPlugin(const QString &classId, const QUrl&, const QStrin
return l;
}
-#ifndef QT_NO_UITOOLS
- QUiLoader loader;
- return loader.createWidget(classId, view());
-#else
- Q_UNUSED(classId);
+ if (classId == QLatin1String("QProgressBar"))
+ return new QProgressBar(view());
+ if (classId == QLatin1String("QLabel"))
+ return new QLabel(view());
return 0;
-#endif
}
diff --git a/Tools/Scripts/build-webkit b/Tools/Scripts/build-webkit
index b1d778523..c8182148b 100755
--- a/Tools/Scripts/build-webkit
+++ b/Tools/Scripts/build-webkit
@@ -137,7 +137,7 @@ my (
my @features = (
{ option => "request-animation-frame", desc => "Toggle requestAnimationFrame support",
- define => "ENABLE_REQUEST_ANIMATION_FRAME", default => (isAppleMacWebKit()), value => \$requestAnimationFrameSupport },
+ define => "ENABLE_REQUEST_ANIMATION_FRAME", default => (isAppleMacWebKit() || isGtk()), value => \$requestAnimationFrameSupport },
{ option => "download-attribute", desc => "Toggle download attribute support",
define => "ENABLE_DOWNLOAD_ATTRIBUTE", default => isBlackBerry(), value =>\$downloadAttributeSupport },
diff --git a/Tools/Scripts/check-webkit-style b/Tools/Scripts/check-webkit-style
index 0995386b5..54ca276ea 100755
--- a/Tools/Scripts/check-webkit-style
+++ b/Tools/Scripts/check-webkit-style
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright (C) 2009 Google Inc. All rights reserved.
+# Copyright (C) 2011 Google Inc. All rights reserved.
# Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com)
#
# Redistribution and use in source and binary forms, with or without
@@ -39,6 +39,8 @@ find is legitimately a problem."""
import sys
+import webkitpy.common.version_check
+
from webkitpy.style.main import CheckWebKitStyle
diff --git a/Tools/Scripts/new-run-webkit-httpd b/Tools/Scripts/new-run-webkit-httpd
index f919114fa..7dc2b27c9 100755
--- a/Tools/Scripts/new-run-webkit-httpd
+++ b/Tools/Scripts/new-run-webkit-httpd
@@ -42,6 +42,8 @@ import os
import sys
import tempfile
+import webkitpy.common.version_check
+
from webkitpy.common.host import Host
from webkitpy.layout_tests.servers import http_server
diff --git a/Tools/Scripts/new-run-webkit-tests b/Tools/Scripts/new-run-webkit-tests
index b494636ba..8f7cd043e 100755
--- a/Tools/Scripts/new-run-webkit-tests
+++ b/Tools/Scripts/new-run-webkit-tests
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# Copyright (C) 2010 Google Inc. All rights reserved.
+# 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
@@ -33,6 +33,8 @@ import signal
import subprocess
import sys
+import webkitpy.common.version_check
+
if __name__ == '__main__':
# In order for the multiprocessing module to spawn children correctly on
# Windows, we need to be running a Python module that can be imported
diff --git a/Tools/Scripts/prepare-ChangeLog b/Tools/Scripts/prepare-ChangeLog
index ef4d2712e..3c09655b8 100755
--- a/Tools/Scripts/prepare-ChangeLog
+++ b/Tools/Scripts/prepare-ChangeLog
@@ -1150,7 +1150,7 @@ sub get_function_line_ranges_for_javascript($$)
} elsif ($match eq '//') {
s-//.*--;
} else { # ' or "
- if (!s-$match([^\\]|\\.)*?$match--) {
+ if (!s-$match([^\\]|\\.)*?$match-string_appeared_here-) {
$inQuotedText = $match if /\\$/;
warn "mismatched quotes at line $. in $fileName\n" if $inQuotedText eq "";
s-$match.*--;
@@ -1286,25 +1286,38 @@ sub get_function_line_ranges_for_perl($$)
my $currentFunction = "";
my $start = 0;
+ my $hereDocumentIdentifier = "";
while (<$fileHandle>) {
- if (/^sub\s+([^(\s]+)/) {
- # Skip over forward declarations, which don't contain a brace and end with a semicolon.
- next if !/{/ && /;$/;
+ chomp;
+ if (!$hereDocumentIdentifier) {
+ if (/^sub\s+([\w_][\w\d_]*)/) {
+ # Skip over forward declarations, which don't contain a brace and end with a semicolon.
+ next if /;\s*$/;
- if ($currentFunction) {
- warn "nested functions found at top-level at $fileName:$.\n";
- next;
+ if ($currentFunction) {
+ warn "nested functions found at top-level at $fileName:$.\n";
+ next;
+ }
+ $currentFunction = $1;
+ $start = $.;
}
- $currentFunction = $1;
- $start = $.;
- }
- if (index($_, "}") == 0) {
- next unless $start;
- push(@ranges, [$start, $., $currentFunction]);
- $currentFunction = "";
- $start = 0;
- next;
+ if (/<<\s*[\"\']?([\w_][\w_\d]*)/) {
+ # Enter here-document.
+ $hereDocumentIdentifier = $1;
+ }
+ if (index($_, "}") == 0) {
+ unless ($start) {
+ warn "nested functions found at top-level at $fileName:$.\n";
+ next;
+ }
+ push(@ranges, [$start, $., $currentFunction]);
+ $currentFunction = "";
+ $start = 0;
+ }
+ } elsif ($_ eq $hereDocumentIdentifier) {
+ # Escape from here-document.
+ $hereDocumentIdentifier = "";
}
}
@@ -1380,7 +1393,6 @@ sub get_function_line_ranges_for_python($$)
# Read a file and get all the line ranges of the things that look like CSS selectors. A selector is
# anything before an opening brace on a line. A selector starts at the line containing the opening
# brace and ends at the closing brace.
-# FIXME: Comments are parsed just like uncommented text.
#
# Result is a list of triples: [ start_line, end_line, selector ].
@@ -1392,21 +1404,36 @@ sub get_selector_line_ranges_for_css($$)
my $currentSelector = "";
my $start = 0;
+ my $inComment = 0;
+ my $inBrace = 0;
while (<$fileHandle>) {
- if (/^[ \t]*(.*[^ \t])[ \t]*{/) {
- $currentSelector = $1;
- $start = $.;
- }
- if (index($_, "}") >= 0) {
- unless ($start) {
- warn "mismatched braces in $fileName\n";
- next;
+ foreach my $token (split m-(\{|\}|/\*|\*/)-, $_) {
+ if ($token eq "{") {
+ if (!$inComment) {
+ warn "mismatched brace found in $fileName\n" if $inBrace;
+ $inBrace = 1;
+ }
+ } elsif ($token eq "}") {
+ if (!$inComment) {
+ warn "mismatched brace found in $fileName\n" if !$inBrace;
+ $inBrace = 0;
+ push(@ranges, [$start, $., $currentSelector]);
+ $currentSelector = "";
+ $start = 0;
+ }
+ } elsif ($token eq "/*") {
+ $inComment = 1;
+ } elsif ($token eq "*/") {
+ warn "mismatched comment found in $fileName\n" if !$inComment;
+ $inComment = 0;
+ } else {
+ if (!$inComment and !$inBrace and $token !~ /^[\s\t]*$/) {
+ $token =~ s/^[\s\t]*|[\s\t]*$//g;
+ $currentSelector = $token;
+ $start = $.;
+ }
}
- push(@ranges, [$start, $., $currentSelector]);
- $currentSelector = "";
- $start = 0;
- next;
}
}
diff --git a/Tools/Scripts/rebaseline-chromium-webkit-tests b/Tools/Scripts/rebaseline-chromium-webkit-tests
index d633db560..9422d0167 100755
--- a/Tools/Scripts/rebaseline-chromium-webkit-tests
+++ b/Tools/Scripts/rebaseline-chromium-webkit-tests
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# Copyright (C) 2010 Google Inc. All rights reserved.
+# 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
@@ -29,6 +29,8 @@
import sys
+import webkitpy.common.version_check
+
import webkitpy.to_be_moved.rebaseline_chromium_webkit_tests
diff --git a/Tools/Scripts/run-api-tests b/Tools/Scripts/run-api-tests
index 9330d8cae..3a3e00cda 100755
--- a/Tools/Scripts/run-api-tests
+++ b/Tools/Scripts/run-api-tests
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
-# Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
+# Copyright (C) 2010, 2011, 2012 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -23,10 +23,6 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
-# Features to add:
-# - Command line option to run a single test.
-# - Command line option to run all tests in a suite.
-
use strict;
use warnings;
@@ -39,10 +35,10 @@ use webkitdirs;
use VCSUtils;
sub buildTestTool();
-sub dumpTestsBySuite(\%);
-sub populateTests();
+sub dumpTestsBySuite(\@);
+sub listAllTests();
sub runTest($$$);
-sub runTestsBySuite(\%$);
+sub runTestsBySuite(\@$);
sub prepareEnvironmentForRunningTestTool();
sub testToolPath();
@@ -62,7 +58,7 @@ my @testsTimedOut;
my $programName = basename($0);
my $usage = <<EOF;
-Usage: $programName [options]
+Usage: $programName [options] [suite or test prefixes]
--help Show this help message
-v|--verbose Verbose output
-d|--dump-tests Dump the names of testcases without running them
@@ -85,46 +81,52 @@ if ($showHelp) {
setConfiguration();
buildTestTool() if $build;
setPathForRunningWebKitApp(\%ENV);
-my %testsToRun = populateTests();
+my @testsToRun = listAllTests();
+
+@testsToRun = grep { my $test = $_; grep { $test =~ m/^\Q$_\E/ } @ARGV; } @testsToRun if @ARGV;
if ($dumpTests) {
- dumpTestsBySuite(%testsToRun);
+ dumpTestsBySuite(@testsToRun);
exit 0;
}
-if (runTestsBySuite(%testsToRun, $verbose)) {
- exit 1;
-}
+exit runTestsBySuite(@testsToRun, $verbose);
sub isSupportedPlatform()
{
return isAppleMacWebKit() || isAppleWinWebKit() || isChromium();
}
-sub dumpTestsBySuite(\%)
+sub dumpTestsBySuite(\@)
{
- my ($testsBySuite) = @_;
+ my ($tests) = @_;
print "Dumping test cases\n";
print "------------------\n";
- for my $suite (sort keys %$testsBySuite) {
- print $suite . ":\n";
- print map { " " . $_ . "\n" } sort @{ $testsBySuite->{$suite} };
+ my $lastSuite = "";
+ for my $suiteAndTest (sort @$tests) {
+ my ($suite, $test) = split(/\./, $suiteAndTest);
+ if ($lastSuite ne $suite) {
+ $lastSuite = $suite;
+ print "$suite:\n";
+ }
+ print " $test\n";
}
print "------------------\n";
}
-sub runTestsBySuite(\%$)
+sub runTestsBySuite(\@$)
{
my ($tests, $verbose) = @_;
my $anyFailures = 0;
- for my $suite (sort keys %$tests) {
- print "Suite: $suite\n" unless $verbose;
- for my $test (sort @{$tests->{$suite}}) {
- my $failed = runTest($suite, $test, $verbose);
- if ($failed) {
- $anyFailures = 1;
- }
+ my $lastSuite = "";
+ for my $suiteAndTest (sort @$tests) {
+ my ($suite, $test) = split(/\./, $suiteAndTest);
+ if ($lastSuite ne $suite) {
+ $lastSuite = $suite;
+ print "Suite: $suite\n" unless $verbose;
}
+ my $failed = runTest($suite, $test, $verbose);
+ $anyFailures ||= $failed;
}
if ($verbose) {
@@ -212,9 +214,9 @@ sub runTest($$$)
return $timedOut || $result;
}
-sub populateTests()
+sub listAllTests()
{
- my @tests;
+ my @toolOutput;
my $timedOut;
die "run-api-tests is not supported on this platform.\n" unless isSupportedPlatform();
@@ -238,7 +240,7 @@ sub populateTests()
}
close($childIn);
- @tests = <$childOut>;
+ @toolOutput = <$childOut>;
close($childOut);
close($childErr);
close(DEVNULL) unless ($verbose);
@@ -251,22 +253,20 @@ sub populateTests()
exit exitStatus($result);
}
- my %keyedTests = ();
+ my @tests = ();
my $suite;
- for my $test (@tests) {
- $test =~ s/[\r\n]*$//;
- if ($test =~ m/\.$/) {
- $test =~ s/\.$//;
- $suite = $test;
+ for my $line (@toolOutput) {
+ $line =~ s/[\r\n]*$//;
+ if ($line =~ m/\.$/) {
+ $suite = $line; # "SuiteName."
} else {
- $test =~ s/^\s*//;
- push @{$keyedTests{$suite}}, $test;
+ $line =~ s/^\s*//; # "TestName"
+ push @tests, $suite . $line; # "SuiteName.TestName"
}
}
-
- return %keyedTests;
-}
+ return @tests;
+}
sub buildTestTool()
{
diff --git a/Tools/Scripts/run-webkit-tests b/Tools/Scripts/run-webkit-tests
index 0e5fe1f71..1cfede61c 100755
--- a/Tools/Scripts/run-webkit-tests
+++ b/Tools/Scripts/run-webkit-tests
@@ -108,6 +108,8 @@ if (isQt()) {
push(@ARGV, "--qt") if(!$isPlatformSet);
} elsif (isGtk()) {
push(@ARGV, "--gtk");
+} elsif (isEfl()) {
+ push(@ARGV, "--efl");
}
my $harnessPath = File::Spec->catfile(relativeScriptsDir(), $harnessName);
diff --git a/Tools/Scripts/test-webkitpy b/Tools/Scripts/test-webkitpy
index 083fb779e..b72115c8b 100755
--- a/Tools/Scripts/test-webkitpy
+++ b/Tools/Scripts/test-webkitpy
@@ -1,11 +1,11 @@
#!/usr/bin/env python
-# Copyright (c) 2009 Google Inc. All rights reserved.
+# Copyright (c) 2011 Google Inc. All rights reserved.
# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
#
# 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
@@ -15,7 +15,7 @@
# * 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
@@ -32,13 +32,9 @@ import logging
import os
import sys
-# Do not import anything from webkitpy prior to cleaning webkitpy of
-# orphaned *.pyc files. This ensures that no orphaned *.pyc files are
-# accidentally imported during the course of this script.
-#
-# Also, do not import or execute any Python code incompatible with
-# Python 2.4 until after execution of the init() method below.
-
+# We strictly limit what is imported from webkitpy until we get a chance
+# to delete any stray *.pyc files.
+import webkitpy.common.version_check
_log = logging.getLogger("test-webkitpy")
@@ -61,8 +57,6 @@ def configure_logging(is_verbose_logging):
logging.DEBUG. Otherwise, it is set to logging.INFO.
"""
- # Don't use the Python ternary operator here so that this method will
- # work with Python 2.4.
if is_verbose_logging:
logging_level = logging.DEBUG
else:
@@ -110,58 +104,22 @@ def configure_logging(is_verbose_logging):
handler.addFilter(testing_filter)
-def _clean_pyc_files(dir_to_clean, paths_not_to_log):
- """Delete from a directory all .pyc files that have no .py file.
-
- Args:
- dir_to_clean: The path to the directory to clean.
- paths_not_to_log: A list of paths to .pyc files whose deletions should
- not be logged. This list should normally include
- only test .pyc files.
-
- """
+def _clean_pyc_files(dir_to_clean):
+ """Delete from under a directory all .pyc files that have no .py file."""
_log.debug("Cleaning orphaned *.pyc files from: %s" % dir_to_clean)
-
- # Normalize paths not to log.
- paths_not_to_log = [os.path.abspath(path) for path in paths_not_to_log]
-
for dir_path, dir_names, file_names in os.walk(dir_to_clean):
for file_name in file_names:
if file_name.endswith(".pyc") and file_name[:-1] not in file_names:
file_path = os.path.join(dir_path, file_name)
- if os.path.abspath(file_path) not in paths_not_to_log:
- _log.info("Deleting orphan *.pyc file: %s" % file_path)
+ _log.info("Deleting orphan *.pyc file: %s" % file_path)
os.remove(file_path)
-# As a substitute for a unit test, this method tests _clean_pyc_files()
-# in addition to calling it. We chose not to use the unittest module
-# because _clean_pyc_files() is called only once and is not used elsewhere.
-def _clean_packages_with_test(external_package_paths):
+def _clean_packages(external_package_paths):
webkitpy_dir = os.path.join(os.path.dirname(__file__), "webkitpy")
package_paths = [webkitpy_dir] + external_package_paths
-
- # The test .pyc file is--
- # webkitpy/python24/TEMP_test-webkitpy_test_pyc_file.pyc.
- test_path = os.path.join(webkitpy_dir, "python24",
- "TEMP_test-webkitpy_test_pyc_file.pyc")
-
- test_file = open(test_path, "w")
- try:
- test_file.write("Test .pyc file generated by test-webkitpy.")
- finally:
- test_file.close()
-
- # Confirm that the test file exists so that when we check that it does
- # not exist, the result is meaningful.
- if not os.path.exists(test_path):
- raise Exception("Test .pyc file not created: %s" % test_path)
-
for path in package_paths:
- _clean_pyc_files(path, [test_path])
-
- if os.path.exists(test_path):
- raise Exception("Test .pyc file not deleted: %s" % test_path)
+ _clean_pyc_files(path)
def init(command_args, external_package_paths):
@@ -194,10 +152,10 @@ def init(command_args, external_package_paths):
# after any file moves. Otherwise, incorrect import statements can
# be masked.
#
- # For example, if webkitpy/python24/versioning.py were moved to a
+ # For example, if webkitpy/common/host.py were moved to a
# different location without changing any import statements, and if
# the corresponding .pyc file were left behind without deleting it,
- # then "import webkitpy.python24.versioning" would continue to succeed
+ # then "import webkitpy.common.host" would continue to succeed
# even though it would fail for someone checking out a fresh copy
# of the source tree. This is because of a Python feature:
#
@@ -210,21 +168,8 @@ def init(command_args, external_package_paths):
#
# Deleting the orphaned .pyc file prior to importing, however, would
# cause an ImportError to occur on import as desired.
- _clean_packages_with_test(external_package_paths)
-
- import webkitpy.python24.versioning as versioning
-
- versioning.check_version(log=_log)
+ _clean_packages(external_package_paths)
- (comparison, current_version, expected_version) = \
- versioning.compare_version()
-
- if comparison != 0:
- # Then the current version is not what we expect.
- message = ("You are testing webkitpy with Python version (%s) "
- "instead of version (%s) which we support. Please verify "
- "changes against version (%s)" % (current_version, expected_version, expected_version))
- _log.warn(message)
def _path_from_webkit_root(*components):
webkit_root = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
diff --git a/Tools/Scripts/webkit-patch b/Tools/Scripts/webkit-patch
index 91e4c0f9a..a8ce5130b 100755
--- a/Tools/Scripts/webkit-patch
+++ b/Tools/Scripts/webkit-patch
@@ -7,7 +7,7 @@
# 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
@@ -17,7 +17,7 @@
# * 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
@@ -38,14 +38,17 @@ import signal
import sys
import codecs
+import webkitpy.common.version_check
+
+from webkitpy.common.system.logutils import configure_logging
+from webkitpy.tool.main import WebKitPatch
+
# By default, sys.stdout assumes ascii encoding. Since our messages can
# contain unicode strings (as with some peoples' names) we need to apply
# the utf-8 codec to prevent throwing and exception.
# Not having this was the cause of https://bugs.webkit.org/show_bug.cgi?id=63452.
sys.stdout = codecs.lookup('utf-8')[-1](sys.stdout)
-from webkitpy.common.system.logutils import configure_logging
-import webkitpy.python24.versioning as versioning
_log = logging.getLogger("webkit-patch")
@@ -58,14 +61,6 @@ def main():
else:
logging_level = logging.INFO
configure_logging(logging_level=logging_level)
-
- versioning.check_version()
-
- # Import webkit-patch code only after version-checking so that
- # script doesn't error out before having a chance to report the
- # version warning.
- from webkitpy.tool.main import WebKitPatch
-
WebKitPatch(os.path.abspath(__file__)).main()
diff --git a/Tools/Scripts/webkitdirs.pm b/Tools/Scripts/webkitdirs.pm
index 7cad91016..c8fa05ad5 100755
--- a/Tools/Scripts/webkitdirs.pm
+++ b/Tools/Scripts/webkitdirs.pm
@@ -1770,7 +1770,7 @@ sub runAutogenForAutotoolsProjectIfNecessary($@)
# between 32-bit and 64-bit architectures. The options are also
# used on Chromium build.
determineArchitecture();
- if ($architecture ne "x86_64") {
+ if ($architecture ne "x86_64" && !isARM()) {
$ENV{'CXXFLAGS'} = "-march=pentium4 -msse2 -mfpmath=sse";
}
@@ -2111,6 +2111,10 @@ sub buildQMakeProject($@)
File::Path::rmtree($dir);
File::Path::mkpath($dir);
chdir $dir or die "Failed to cd into " . $dir . "\n";
+
+ # After removing WebKitBuild directory, we have to call qtFeatureDefaults()
+ # to run config tests and generate the removed Tools/qmake/.qmake.cache again.
+ qtFeatureDefaults(\@buildArgs);
#}
}
@@ -2266,7 +2270,7 @@ sub buildChromium($@)
} elsif (isCygwin() || isWindows()) {
# Windows build - builds the root visual studio solution.
$result = buildChromiumVisualStudioProject("Source/WebKit/chromium/WebKit.sln", $clean);
- } elsif (isLinux() || isChromiumAndroid() || isChromiumMacMake) {
+ } elsif (isLinux() || isChromiumAndroid() || isChromiumMacMake()) {
# Linux build - build using make.
$result = buildChromiumMakefile("all", $clean, @options);
} else {
diff --git a/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/parser_unittests.pl b/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/parser_unittests.pl
index bad90805b..ae9e14b1c 100644
--- a/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/parser_unittests.pl
+++ b/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/parser_unittests.pl
@@ -32,10 +32,13 @@ use Test::More;
use lib File::Spec->catdir($FindBin::Bin, "..");
use LoadAsModule qw(PrepareChangeLog prepare-ChangeLog);
-my %testFiles = ("perl_unittests.pl" => "perl",
- "python_unittests.py" => "python",
- "java_unittests.java" => "java",
- "cpp_unittests.cpp" => "cpp");
+my %testFiles = ("perl_unittests.pl" => "get_function_line_ranges_for_perl",
+ "python_unittests.py" => "get_function_line_ranges_for_python",
+ "java_unittests.java" => "get_function_line_ranges_for_java",
+ "cpp_unittests.cpp" => "get_function_line_ranges_for_cpp",
+ "javascript_unittests.js" => "get_function_line_ranges_for_javascript",
+ "css_unittests.css" => "get_selector_line_ranges_for_css",
+ );
my $resetResults;
GetOptions('reset-results' => \$resetResults);
@@ -44,7 +47,7 @@ my @testSet;
foreach my $testFile (sort keys %testFiles) {
my $basename = $testFile;
$basename = $1 if $basename =~ /^(.*)\.[^\.]*$/;
- push @testSet, {language => $testFiles{$testFile},
+ push @testSet, {method => $testFiles{$testFile},
inputFile => File::Spec->catdir($FindBin::Bin, "resources", $testFile),
expectedFile => File::Spec->catdir($FindBin::Bin, "resources", $basename . "-expected.txt")};
}
@@ -52,7 +55,7 @@ foreach my $testFile (sort keys %testFiles) {
plan(tests => scalar @testSet);
foreach my $test (@testSet) {
open FH, "< $test->{inputFile}" or die "Cannot open $test->{inputFile}: $!";
- my $parser = eval "\\&PrepareChangeLog::get_function_line_ranges_for_$test->{language}";
+ my $parser = eval "\\&PrepareChangeLog::$test->{method}";
my @actualOutput = $parser->(\*FH, $test->{inputFile});;
close FH;
diff --git a/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/css_unittests-expected.txt b/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/css_unittests-expected.txt
new file mode 100644
index 000000000..79aa94365
--- /dev/null
+++ b/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/css_unittests-expected.txt
@@ -0,0 +1,92 @@
+[
+ [
+ '20',
+ '21',
+ 'element1'
+ ],
+ [
+ '23',
+ '23',
+ 'element2'
+ ],
+ [
+ '25',
+ '27',
+ 'element3'
+ ],
+ [
+ '29',
+ '30',
+ 'element4.p'
+ ],
+ [
+ '32',
+ '33',
+ 'element5.p.q.r.s'
+ ],
+ [
+ '35',
+ '36',
+ 'element6#p'
+ ],
+ [
+ '38',
+ '39',
+ 'element7 element8'
+ ],
+ [
+ '41',
+ '42',
+ 'element9.p element10.q'
+ ],
+ [
+ '44',
+ '45',
+ 'element11#p element12#q'
+ ],
+ [
+ '47',
+ '48',
+ 'element13, element14'
+ ],
+ [
+ '50',
+ '51',
+ '.p'
+ ],
+ [
+ '53',
+ '55',
+ '#p'
+ ],
+ [
+ '57',
+ '58',
+ '.p element15 #q element16.r element17#s'
+ ],
+ [
+ '60',
+ '61',
+ 'element18:target'
+ ],
+ [
+ '63',
+ '65',
+ 'element19'
+ ],
+ [
+ '67',
+ '69',
+ 'element20'
+ ],
+ [
+ '71',
+ '74',
+ 'element21'
+ ],
+ [
+ '76',
+ '79',
+ 'element22'
+ ]
+]
diff --git a/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/css_unittests.css b/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/css_unittests.css
new file mode 100644
index 000000000..4bd172ec1
--- /dev/null
+++ b/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/css_unittests.css
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+element1 {
+}
+
+element2 { }
+
+element3
+{
+}
+
+element4.p {
+}
+
+element5.p.q.r.s {
+}
+
+element6#p {
+}
+
+element7 element8 {
+}
+
+element9.p element10.q {
+}
+
+element11#p element12#q {
+}
+
+element13, element14 {
+}
+
+.p {
+}
+
+#p {
+
+}
+
+.p element15 #q element16.r element17#s {
+}
+
+element18:target {
+}
+
+element19 {
+ property1: 123
+}
+
+element20 {
+ property1: 123;
+}
+
+element21 {
+ property1: 123;
+ property2: 456;
+}
+
+element22 {
+ property1: 123;
+ /* comment */
+}
+
+/*
+elementInsideComment {
+ property1: 123;
+}
+*/
diff --git a/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/javascript_unittests-expected.txt b/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/javascript_unittests-expected.txt
new file mode 100644
index 000000000..275045a8a
--- /dev/null
+++ b/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/javascript_unittests-expected.txt
@@ -0,0 +1,132 @@
+[
+ [
+ '20',
+ '22',
+ 'func1'
+ ],
+ [
+ '24',
+ '25',
+ 'func2'
+ ],
+ [
+ '27',
+ '27',
+ 'func3'
+ ],
+ [
+ '29',
+ '32',
+ 'func4'
+ ],
+ [
+ '34',
+ '37',
+ 'func5'
+ ],
+ [
+ '39',
+ '42',
+ 'func6'
+ ],
+ [
+ '50',
+ '52',
+ 'func7'
+ ],
+ [
+ '56',
+ '58',
+ 'func8'
+ ],
+ [
+ '62',
+ '64',
+ 'func9'
+ ],
+ [
+ '66',
+ '68',
+ 'func10'
+ ],
+ [
+ '70',
+ '73',
+ 'func11'
+ ],
+ [
+ '75',
+ '79',
+ 'func12'
+ ],
+ [
+ '81',
+ '83',
+ 'funcOverloaded'
+ ],
+ [
+ '85',
+ '87',
+ 'funcOverloaded'
+ ],
+ [
+ '89',
+ '91',
+ 'funcOverloaded'
+ ],
+ [
+ '94',
+ '96',
+ 'Func1.prototype.get x1'
+ ],
+ [
+ '98',
+ '101',
+ 'Func1.prototype.get x2'
+ ],
+ [
+ '103',
+ '105',
+ 'Func1.prototype.set x1'
+ ],
+ [
+ '107',
+ '110',
+ 'Func1.prototype.set x3'
+ ],
+ [
+ '114',
+ '116',
+ 'Func2.prototype.func13'
+ ],
+ [
+ '118',
+ '120',
+ 'Func2.prototype.func14'
+ ],
+ [
+ '122',
+ '125',
+ 'Func2.prototype.func15'
+ ],
+ [
+ '133',
+ '134',
+ 'func16.func17'
+ ],
+ [
+ '136',
+ '137',
+ 'func16.func18'
+ ],
+ [
+ '139',
+ '141',
+ 'func16.func19'
+ ],
+ [
+ '128',
+ '150',
+ 'func16'
+ ]
+]
diff --git a/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/javascript_unittests.js b/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/javascript_unittests.js
new file mode 100644
index 000000000..93d1d4ccf
--- /dev/null
+++ b/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/javascript_unittests.js
@@ -0,0 +1,150 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+function func1()
+{
+}
+
+function func2() {
+}
+
+function func3() { }
+
+function func4()
+{
+ return 123;
+}
+
+function func5()
+{
+ // comment
+}
+
+function func6()
+{
+ /* comment */
+}
+
+/*
+function funcInsideComment()
+{
+}
+*/
+
+function func7()
+{
+}
+
+var str1 = "function funcInsideDoubleQuotedString() {}";
+
+function func8()
+{
+}
+
+var str2 = 'function funcInsideSingleQuotedString() {}';
+
+function func9(a)
+{
+}
+
+function func10(a, b)
+{
+}
+
+function func11
+ (a, b)
+{
+}
+
+function func12(a, b,
+ c, d
+ , e, f)
+{
+}
+
+function funcOverloaded()
+{
+}
+
+function funcOverloaded(a)
+{
+}
+
+function funcOverloaded(a, b)
+{
+}
+
+Func1.prototype = {
+ get x1()
+ {
+ },
+
+ get x2()
+ {
+ return this.x2;
+ },
+
+ set x1(a)
+ {
+ },
+
+ set x3(a)
+ {
+ this.x3 = a;
+ }
+};
+
+Func2.prototype = {
+ func13 : function()
+ {
+ },
+
+ func14 : function(a)
+ {
+ },
+
+ func15 : function(a, b)
+ {
+ return 123;
+ }
+};
+
+function func16()
+{
+ var a = 123;
+ var b = 456;
+
+ var func17 = function() {
+ };
+
+ var func18 = function(a) {
+ };
+
+ var func19 = function(a, b) {
+ return 123;
+ };
+
+ func20(function()
+ {
+ },
+ function(a)
+ {
+ return 123;
+ });
+}
diff --git a/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/perl_unittests-expected.txt b/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/perl_unittests-expected.txt
index 0092fdaad..913749a14 100644
--- a/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/perl_unittests-expected.txt
+++ b/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/perl_unittests-expected.txt
@@ -28,5 +28,55 @@
'44',
'46',
'func6'
+ ],
+ [
+ '48',
+ '53',
+ 'func7'
+ ],
+ [
+ '55',
+ '60',
+ 'func8'
+ ],
+ [
+ '62',
+ '67',
+ 'func9'
+ ],
+ [
+ '69',
+ '76',
+ 'func10'
+ ],
+ [
+ '78',
+ '88',
+ 'func11'
+ ],
+ [
+ '90',
+ '100',
+ 'func12'
+ ],
+ [
+ '102',
+ '111',
+ 'func13'
+ ],
+ [
+ '113',
+ '118',
+ 'func14'
+ ],
+ [
+ '120',
+ '125',
+ 'func15'
+ ],
+ [
+ '127',
+ '128',
+ 'func16'
]
]
diff --git a/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/perl_unittests.pl b/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/perl_unittests.pl
index aa43419da..02c99379c 100644
--- a/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/perl_unittests.pl
+++ b/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/perl_unittests.pl
@@ -44,3 +44,90 @@ sub func5($$$$)
sub func6(\@\@\$\$\$\$)
{
}
+
+sub func7
+{
+ $str =<< EOF;
+
+EOF
+}
+
+sub func8
+{
+ $str =<< "EOF";
+
+EOF
+}
+
+sub func9
+{
+ $str =<< 'EOF';
+
+EOF
+}
+
+sub func10
+{
+ $str =<< EOF;
+sub funcInHereDocument1
+{
+}
+EOF
+}
+
+sub func11
+{
+ $str =<< EOF;
+sub funcInHereDocument2
+{
+}
+sub funcInHereDocument3
+{
+}
+EOF
+}
+
+sub func12
+{
+ $str =<< EOF;
+{
+{
+{
+}
+}
+}
+EOF
+}
+
+sub func13
+{
+ $str =<< EOF;
+
+$str << DUMMY_EOF
+
+DUMMY_EOF
+
+EOF
+}
+
+sub func14
+{
+ push(@array, << EOF);
+
+EOF
+}
+
+sub func15
+{
+ print << EOF;
+
+EOF
+}
+
+sub func16 {
+}
+
+sub prototypeDeclaration1;
+sub prototypeDeclaration2();
+sub prototypeDeclaration3(\@$$);
+
diff --git a/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py b/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py
index 72d7a7ebf..7adac1252 100644
--- a/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py
+++ b/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py
@@ -55,12 +55,12 @@ class BaselineOptimizerTest(unittest.TestCase):
def test_move_baselines(self):
host = MockHost()
host.filesystem.write_binary_file('/mock-checkout/LayoutTests/platform/chromium-win/another/test-expected.txt', 'result A')
- host.filesystem.write_binary_file('/mock-checkout/LayoutTests/platform/chromium-cg-mac/another/test-expected.txt', 'result A')
+ host.filesystem.write_binary_file('/mock-checkout/LayoutTests/platform/chromium-mac/another/test-expected.txt', 'result A')
host.filesystem.write_binary_file('/mock-checkout/LayoutTests/platform/chromium/another/test-expected.txt', 'result B')
baseline_optimizer = BaselineOptimizer(host)
baseline_optimizer._move_baselines('another/test-expected.txt', {
'LayoutTests/platform/chromium-win': 'aaa',
- 'LayoutTests/platform/chromium-cg-mac': 'aaa',
+ 'LayoutTests/platform/chromium-mac': 'aaa',
'LayoutTests/platform/chromium': 'bbb',
}, {
'LayoutTests/platform/chromium': 'aaa',
@@ -77,7 +77,7 @@ class BaselineOptimizerTest(unittest.TestCase):
def test_chromium_covers_mac_win_linux(self):
self._assertOptimization({
- 'LayoutTests/platform/chromium-cg-mac': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
+ 'LayoutTests/platform/chromium-mac': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
'LayoutTests/platform/chromium-win': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
'LayoutTests/platform/chromium-linux': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
}, {
@@ -86,7 +86,7 @@ class BaselineOptimizerTest(unittest.TestCase):
def test_chromium_mac_redundant_with_apple_mac(self):
self._assertOptimization({
- 'LayoutTests/platform/chromium-cg-mac-snowleopard': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
+ 'LayoutTests/platform/chromium-mac-snowleopard': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
'LayoutTests/platform/mac-snowleopard': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
}, {
'LayoutTests/platform/mac-snowleopard': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
@@ -124,7 +124,7 @@ class BaselineOptimizerTest(unittest.TestCase):
self._assertOptimization({
'LayoutTests/platform/chromium-win': '23a30302a6910f8a48b1007fa36f3e3158341834',
'LayoutTests': '9c876f8c3e4cc2aef9519a6c1174eb3432591127',
- 'LayoutTests/platform/chromium-cg-mac': '23a30302a6910f8a48b1007fa36f3e3158341834',
+ 'LayoutTests/platform/chromium-mac': '23a30302a6910f8a48b1007fa36f3e3158341834',
'LayoutTests/platform/chromium-mac': '23a30302a6910f8a48b1007fa36f3e3158341834',
}, {
'LayoutTests/platform/chromium': '23a30302a6910f8a48b1007fa36f3e3158341834',
@@ -140,7 +140,7 @@ class BaselineOptimizerTest(unittest.TestCase):
'LayoutTests/platform/chromium-win': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
'LayoutTests/platform/mac': '5daa78e55f05d9f0d1bb1f32b0cd1bc3a01e9364',
'LayoutTests/platform/chromium-win-xp': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
- 'LayoutTests/platform/chromium-cg-mac-leopard': '65e7d42f8b4882b29d46dc77bb879dd41bc074dc',
+ 'LayoutTests/platform/chromium-mac-leopard': '65e7d42f8b4882b29d46dc77bb879dd41bc074dc',
'LayoutTests/platform/mac-leopard': '7ad045ece7c030e2283c5d21d9587be22bcba56e',
'LayoutTests/platform/chromium-win-vista': 'f83af9732ce74f702b8c9c4a3d9a4c6636b8d3bd',
'LayoutTests/platform/win': '5b1253ef4d5094530d5f1bc6cdb95c90b446bec7',
@@ -149,7 +149,7 @@ class BaselineOptimizerTest(unittest.TestCase):
'LayoutTests/platform/chromium-win': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
'LayoutTests/platform/mac': '5daa78e55f05d9f0d1bb1f32b0cd1bc3a01e9364',
'LayoutTests/platform/chromium-win-xp': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
- 'LayoutTests/platform/chromium-cg-mac-leopard': '65e7d42f8b4882b29d46dc77bb879dd41bc074dc',
+ 'LayoutTests/platform/chromium-mac-leopard': '65e7d42f8b4882b29d46dc77bb879dd41bc074dc',
'LayoutTests/platform/mac-leopard': '7ad045ece7c030e2283c5d21d9587be22bcba56e',
'LayoutTests/platform/chromium-win-vista': 'f83af9732ce74f702b8c9c4a3d9a4c6636b8d3bd',
'LayoutTests/platform/win': '5b1253ef4d5094530d5f1bc6cdb95c90b446bec7',
diff --git a/Tools/Scripts/webkitpy/common/config/build.py b/Tools/Scripts/webkitpy/common/config/build.py
index 23ffbf9f6..ac9a1360d 100644
--- a/Tools/Scripts/webkitpy/common/config/build.py
+++ b/Tools/Scripts/webkitpy/common/config/build.py
@@ -59,15 +59,15 @@ def _should_file_trigger_build(target_platform, file):
("Source/WebCore/image-decoders", ["chromium"]),
("LayoutTests/platform/mac", ["mac", "win"]),
("cairo", ["gtk", "wincairo"]),
- ("cf", ["chromium-mac", "chromium-cg-mac", "mac", "qt", "win"]),
+ ("cf", ["chromium-mac", "mac", "qt", "win"]),
("chromium", ["chromium"]),
- ("cocoa", ["chromium-mac", "chromium-cg-mac", "mac"]),
+ ("cocoa", ["chromium-mac", "mac"]),
("curl", ["gtk", "wincairo"]),
("gobject", ["gtk"]),
("gpu", ["chromium", "mac"]),
("gstreamer", ["gtk"]),
("gtk", ["gtk"]),
- ("mac", ["chromium-mac", "chromium-cg-mac", "mac"]),
+ ("mac", ["chromium-mac", "mac"]),
("mac-leopard", ["mac-leopard"]),
("mac-lion", ["mac", "win"]),
("mac-snowleopard", ["mac-leopard", "mac-snowleopard"]),
diff --git a/Tools/Scripts/webkitpy/common/config/build_unittest.py b/Tools/Scripts/webkitpy/common/config/build_unittest.py
index f627d5935..7e76befe6 100644
--- a/Tools/Scripts/webkitpy/common/config/build_unittest.py
+++ b/Tools/Scripts/webkitpy/common/config/build_unittest.py
@@ -48,7 +48,7 @@ class ShouldBuildTest(unittest.TestCase):
(["LayoutTests/platform/win-wk2/foo"], ["win"]),
(["LayoutTests/platform/win/foo"], ["win"]),
(["Source/WebCore.exp.in", "Source/WebKit/mac/WebKit.exp"], ["mac-leopard", "mac-lion", "mac-snowleopard"]),
- (["Source/WebCore/mac/foo"], ["chromium-mac", "chromium-cg-mac", "mac-leopard", "mac-lion", "mac-snowleopard"]),
+ (["Source/WebCore/mac/foo"], ["chromium-mac", "mac-leopard", "mac-lion", "mac-snowleopard"]),
(["Source/WebCore/win/foo"], ["chromium-win", "win"]),
(["Source/WebCore/platform/graphics/gpu/foo"], ["mac-leopard", "mac-lion", "mac-snowleopard"]),
(["Source/WebCore/platform/wx/wxcode/win/foo"], []),
diff --git a/Tools/Scripts/webkitpy/common/config/committers.py b/Tools/Scripts/webkitpy/common/config/committers.py
index 16e6ed046..eb9afc332 100644
--- a/Tools/Scripts/webkitpy/common/config/committers.py
+++ b/Tools/Scripts/webkitpy/common/config/committers.py
@@ -182,6 +182,7 @@ committers_unable_to_review = [
Committer("Anton Muhin", "antonm@chromium.org", "antonm"),
Committer("Balazs Kelemen", "kbalazs@webkit.org", "kbalazs"),
Committer("Ben Murdoch", "benm@google.com", "benm"),
+ Committer("Ben Wells", "benwells@chromium.org", "benwells"),
Committer("Benjamin C Meyer", ["ben@meyerhome.net", "ben@webkit.org", "bmeyer@rim.com"], "icefox"),
Committer("Benjamin Kalman", ["kalman@chromium.org", "kalman@google.com"], "kalman"),
Committer("Benjamin Otte", ["otte@gnome.org", "otte@webkit.org"], "otte"),
diff --git a/Tools/Scripts/webkitpy/common/config/ports.py b/Tools/Scripts/webkitpy/common/config/ports.py
index a8506f3d9..3e100b059 100644
--- a/Tools/Scripts/webkitpy/common/config/ports.py
+++ b/Tools/Scripts/webkitpy/common/config/ports.py
@@ -105,6 +105,10 @@ class WebKitPort(object):
return cls.script_shell_command("run-javascriptcore-tests")
@classmethod
+ def run_webkit_unit_tests_command(cls):
+ return None
+
+ @classmethod
def run_webkit_tests_command(cls):
return cls.script_shell_command("run-webkit-tests")
@@ -240,6 +244,10 @@ class ChromiumPort(WebKitPort):
return command
@classmethod
+ def run_webkit_unit_tests_command(cls):
+ return cls.script_shell_command("run-chromium-webkit-unit-tests")
+
+ @classmethod
def run_webkit_tests_command(cls):
command = cls.script_shell_command("new-run-webkit-tests")
command.append("--chromium")
diff --git a/Tools/Scripts/webkitpy/common/config/ports_mock.py b/Tools/Scripts/webkitpy/common/config/ports_mock.py
index 65dd442d3..77f51532e 100644
--- a/Tools/Scripts/webkitpy/common/config/ports_mock.py
+++ b/Tools/Scripts/webkitpy/common/config/ports_mock.py
@@ -55,5 +55,8 @@ class MockPort(object):
def run_javascriptcore_tests_command(self):
return ['mock-run-javacriptcore-tests']
+ def run_webkit_unit_tests_command(self):
+ return ['mock-run-webkit-unit-tests']
+
def run_webkit_tests_command(self):
return ['mock-run-webkit-tests']
diff --git a/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py b/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py
index 7581925b0..644a8219a 100644
--- a/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py
+++ b/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py
@@ -287,26 +287,6 @@ class BuildBot(object):
self.buildbot_url = url if url else self._default_url
self._builder_by_name = {}
- # If any core builder is red we should not be landing patches. Other
- # builders should be added to this list once they are known to be
- # reliable.
- # See https://bugs.webkit.org/show_bug.cgi?id=33296 and related bugs.
- self.core_builder_names_regexps = [
- "SnowLeopard.*Build",
- "SnowLeopard.*\(Test",
- "SnowLeopard.*\(WebKit2 Test",
- "Leopard.*\((?:Build|Test)",
- "Windows.*Build",
- "Windows.*\(Test",
- "WinCE",
- "EFL",
- "GTK.*32",
- "GTK.*64",
- "Qt",
- "Chromium.*(Mac|Linux|Win).*Release$",
- "Chromium.*(Mac|Linux|Win).*Release.*\(Tests",
- ]
-
def _parse_last_build_cell(self, builder, cell):
status_link = cell.find('a')
if status_link:
@@ -360,26 +340,10 @@ class BuildBot(object):
return True
return False
- # FIXME: Should move onto Builder
- def _is_core_builder(self, builder_name):
- return self._matches_regexps(builder_name, self.core_builder_names_regexps)
-
# FIXME: This method needs to die, but is used by a unit test at the moment.
def _builder_statuses_with_names_matching_regexps(self, builder_statuses, name_regexps):
return [builder for builder in builder_statuses if self._matches_regexps(builder["name"], name_regexps)]
- def red_core_builders(self):
- return [builder for builder in self.core_builder_statuses() if not builder["is_green"]]
-
- def red_core_builders_names(self):
- return [builder["name"] for builder in self.red_core_builders()]
-
- def idle_red_core_builders(self):
- return [builder for builder in self.red_core_builders() if builder["activity"] == "idle"]
-
- def core_builders_are_green(self):
- return not self.red_core_builders()
-
# FIXME: These _fetch methods should move to a networking class.
def _fetch_build_dictionary(self, builder, build_number):
# Note: filter=1 will remove None and {} and '', which cuts noise but can
@@ -437,9 +401,6 @@ class BuildBot(object):
soup = BeautifulSoup(self._fetch_one_box_per_builder())
return [self._parse_builder_status_from_row(status_row) for status_row in soup.find('table').findAll('tr')]
- def core_builder_statuses(self):
- return [builder for builder in self.builder_statuses() if self._is_core_builder(builder["name"])]
-
def builder_with_name(self, name):
builder = self._builder_by_name.get(name)
if not builder:
@@ -447,11 +408,10 @@ class BuildBot(object):
self._builder_by_name[name] = builder
return builder
- def failure_map(self, only_core_builders=True):
- builder_statuses = self.core_builder_statuses() if only_core_builders else self.builder_statuses()
+ def failure_map(self):
failure_map = FailureMap()
revision_to_failing_bots = {}
- for builder_status in builder_statuses:
+ for builder_status in self.builder_statuses():
if builder_status["is_green"]:
continue
builder = self.builder_with_name(builder_status["name"])
@@ -462,8 +422,8 @@ class BuildBot(object):
# This makes fewer requests than calling Builder.latest_build would. It grabs all builder
# statuses in one request using self.builder_statuses (fetching /one_box_per_builder instead of builder pages).
- def _latest_builds_from_builders(self, only_core_builders=True):
- builder_statuses = self.core_builder_statuses() if only_core_builders else self.builder_statuses()
+ def _latest_builds_from_builders(self):
+ builder_statuses = self.builder_statuses()
return [self.builder_with_name(status["name"]).build(status["build_number"]) for status in builder_statuses]
def _build_at_or_before_revision(self, build, revision):
@@ -472,8 +432,8 @@ class BuildBot(object):
return build
build = build.previous_build()
- def last_green_revision(self, only_core_builders=True):
- builds = self._latest_builds_from_builders(only_core_builders)
+ def last_green_revision(self):
+ builds = self._latest_builds_from_builders()
target_revision = builds[0].revision()
# An alternate way to do this would be to start at one revision and walk backwards
# checking builder.build_for_revision, however build_for_revision is very slow on first load.
diff --git a/Tools/Scripts/webkitpy/common/net/buildbot/buildbot_mock.py b/Tools/Scripts/webkitpy/common/net/buildbot/buildbot_mock.py
index c6cfceb11..f9e27b80b 100644
--- a/Tools/Scripts/webkitpy/common/net/buildbot/buildbot_mock.py
+++ b/Tools/Scripts/webkitpy/common/net/buildbot/buildbot_mock.py
@@ -90,21 +90,6 @@ class MockBuildBot(object):
self._mock_builder2_status,
]
- def red_core_builders_names(self):
- if not self._mock_builder2_status["is_green"]:
- return [self._mock_builder2_status["name"]]
- return []
-
- def red_core_builders(self):
- if not self._mock_builder2_status["is_green"]:
- return [self._mock_builder2_status]
- return []
-
- def idle_red_core_builders(self):
- if not self._mock_builder2_status["is_green"]:
- return [self._mock_builder2_status]
- return []
-
def last_green_revision(self):
return 9479
diff --git a/Tools/Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py b/Tools/Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py
index f824d2f22..5b1e57140 100644
--- a/Tools/Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py
+++ b/Tools/Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py
@@ -219,113 +219,6 @@ class BuildBotTest(unittest.TestCase):
for key, expected_value in expected_parsing.items():
self.assertEquals(builder[key], expected_value, ("Builder %d parse failure for key: %s: Actual='%s' Expected='%s'" % (x, key, builder[key], expected_value)))
- def test_core_builder_methods(self):
- buildbot = BuildBot()
-
- # Override builder_statuses function to not touch the network.
- def example_builder_statuses(): # We could use instancemethod() to bind 'self' but we don't need to.
- return BuildBotTest._expected_example_one_box_parsings
- buildbot.builder_statuses = example_builder_statuses
-
- buildbot.core_builder_names_regexps = [ 'Leopard', "Windows.*Build" ]
- self.assertEquals(buildbot.red_core_builders_names(), [])
- self.assertTrue(buildbot.core_builders_are_green())
-
- buildbot.core_builder_names_regexps = [ 'SnowLeopard', 'Qt' ]
- self.assertEquals(buildbot.red_core_builders_names(), [ u'SnowLeopard Intel Release', u'Qt Linux Release' ])
- self.assertFalse(buildbot.core_builders_are_green())
-
- def test_builder_name_regexps(self):
- buildbot = BuildBot()
-
- # For complete testing, this list should match the list of builders at build.webkit.org:
- example_builders = [
- {'name': u'Leopard Intel Release (Build)', },
- {'name': u'Leopard Intel Release (Tests)', },
- {'name': u'Leopard Intel Debug (Build)', },
- {'name': u'Leopard Intel Debug (Tests)', },
- {'name': u'SnowLeopard Intel Release (Build)', },
- {'name': u'SnowLeopard Intel Release (Tests)', },
- {'name': u'SnowLeopard Intel Release (WebKit2 Tests)', },
- {'name': u'SnowLeopard Intel Leaks', },
- {'name': u'Windows Release (Build)', },
- {'name': u'Windows 7 Release (Tests)', },
- {'name': u'Windows Debug (Build)', },
- {'name': u'Windows XP Debug (Tests)', },
- {'name': u'Windows 7 Release (WebKit2 Tests)', },
- {'name': u'GTK Linux 32-bit Release', },
- {'name': u'GTK Linux 64-bit Release', },
- {'name': u'GTK Linux 64-bit Debug', },
- {'name': u'Qt Linux Release', },
- {'name': u'Qt Linux Release minimal', },
- {'name': u'Qt Linux ARMv7 Release', },
- {'name': u'Qt Windows 32-bit Release', },
- {'name': u'Qt Windows 32-bit Debug', },
- {'name': u'Chromium Android Release', },
- {'name': u'Chromium Win Release', },
- {'name': u'Chromium Win Release (Tests)', },
- {'name': u'Chromium Mac Release', },
- {'name': u'Chromium Mac Release (Tests)', },
- {'name': u'Chromium Linux Release', },
- {'name': u'Chromium Linux Release (Tests)', },
- {'name': u'Leopard Intel Release (NRWT)', },
- {'name': u'SnowLeopard Intel Release (NRWT)', },
- {'name': u'New run-webkit-tests', },
- {'name': u'WinCairo Debug (Build)', },
- {'name': u'WinCE Release (Build)', },
- {'name': u'EFL Linux Release (Build)', },
- ]
- name_regexps = [
- "SnowLeopard.*Build",
- "SnowLeopard.*\(Test",
- "SnowLeopard.*\(WebKit2 Test",
- "Leopard.*\((?:Build|Test)",
- "Windows.*Build",
- "Windows.*\(Test",
- "WinCE",
- "EFL",
- "GTK.*32",
- "GTK.*64",
- "Qt",
- "Chromium.*(Mac|Linux|Win).*Release$",
- "Chromium.*(Mac|Linux|Win).*Release.*\(Tests",
- ]
- expected_builders = [
- {'name': u'Leopard Intel Release (Build)', },
- {'name': u'Leopard Intel Release (Tests)', },
- {'name': u'Leopard Intel Debug (Build)', },
- {'name': u'Leopard Intel Debug (Tests)', },
- {'name': u'SnowLeopard Intel Release (Build)', },
- {'name': u'SnowLeopard Intel Release (Tests)', },
- {'name': u'SnowLeopard Intel Release (WebKit2 Tests)', },
- {'name': u'Windows Release (Build)', },
- {'name': u'Windows 7 Release (Tests)', },
- {'name': u'Windows Debug (Build)', },
- {'name': u'Windows XP Debug (Tests)', },
- {'name': u'GTK Linux 32-bit Release', },
- {'name': u'GTK Linux 64-bit Release', },
- {'name': u'GTK Linux 64-bit Debug', },
- {'name': u'Qt Linux Release', },
- {'name': u'Qt Linux Release minimal', },
- {'name': u'Qt Linux ARMv7 Release', },
- {'name': u'Qt Windows 32-bit Release', },
- {'name': u'Qt Windows 32-bit Debug', },
- {'name': u'Chromium Win Release', },
- {'name': u'Chromium Win Release (Tests)', },
- {'name': u'Chromium Mac Release', },
- {'name': u'Chromium Mac Release (Tests)', },
- {'name': u'Chromium Linux Release', },
- {'name': u'Chromium Linux Release (Tests)', },
- {'name': u'WinCE Release (Build)', },
- {'name': u'EFL Linux Release (Build)', },
- ]
-
- # This test should probably be updated if the default regexp list changes
- self.assertEquals(buildbot.core_builder_names_regexps, name_regexps)
-
- builders = buildbot._builder_statuses_with_names_matching_regexps(example_builders, name_regexps)
- self.assertEquals(builders, expected_builders)
-
def test_builder_with_name(self):
buildbot = BuildBot()
@@ -440,8 +333,10 @@ class BuildBotTest(unittest.TestCase):
def test_last_green_revision(self):
buildbot = BuildBot()
- def mock_builds_from_builders(only_core_builders):
+
+ def mock_builds_from_builders():
return self._fake_builds_at_index(0)
+
buildbot._latest_builds_from_builders = mock_builds_from_builders
self.assertEqual(buildbot.last_green_revision(), 1)
diff --git a/Tools/Scripts/webkitpy/common/system/executive.py b/Tools/Scripts/webkitpy/common/system/executive.py
index 561d8ca80..0481f0472 100644
--- a/Tools/Scripts/webkitpy/common/system/executive.py
+++ b/Tools/Scripts/webkitpy/common/system/executive.py
@@ -46,7 +46,6 @@ import time
from webkitpy.common.system.deprecated_logging import tee
from webkitpy.common.system.filesystem import FileSystem
-from webkitpy.python24 import versioning
_log = logging.getLogger(__name__)
@@ -445,7 +444,7 @@ class Executive(object):
# Win32 Python 2.x uses CreateProcessA rather than CreateProcessW
# to launch subprocesses, so we have to encode arguments using the
# current code page.
- if sys.platform == 'win32' and versioning.compare_version(sys, '3.0')[0] < 0:
+ if sys.platform == 'win32' and sys.version < '3':
return 'mbcs'
# All other platforms use UTF-8.
# FIXME: Using UTF-8 on Cygwin will confuse Windows-native commands
@@ -462,7 +461,7 @@ class Executive(object):
# Win32 Python 2.x uses CreateProcessA rather than CreateProcessW
# to launch subprocesses, so we have to encode arguments using the
# current code page.
- if sys.platform == 'win32' and versioning.compare_version(sys, '3.0')[0] < 0:
+ if sys.platform == 'win32' and sys.version < '3':
return True
return False
diff --git a/Tools/Scripts/webkitpy/common/system/platforminfo.py b/Tools/Scripts/webkitpy/common/system/platforminfo.py
index 64e805df2..dd6d6844c 100644
--- a/Tools/Scripts/webkitpy/common/system/platforminfo.py
+++ b/Tools/Scripts/webkitpy/common/system/platforminfo.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2010 Google Inc. All rights reserved.
+# 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
@@ -26,46 +26,118 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import platform
import re
-# We use this instead of calls to platform directly to allow mocking.
class PlatformInfo(object):
- def __init__(self, executive):
+ """This class provides a consistent (and mockable) interpretation of
+ system-specific values (like sys.platform and platform.mac_ver())
+ to be used by the rest of the webkitpy code base.
+
+ Public (static) properties:
+ -- os_name
+ -- os_version
+
+ Note that 'future' is returned for os_version if the operating system is
+ newer than one known to the code.
+ """
+
+ def __init__(self, sys_module, platform_module, executive):
self._executive = executive
+ self._platform_module = platform_module
+ self.os_name = self._determine_os_name(sys_module.platform)
+ if self.os_name == 'linux':
+ self.os_version = self._determine_linux_version()
+ if self.os_name.startswith('mac'):
+ self.os_version = self._determine_mac_version(platform_module.mac_ver()[0])
+ if self.os_name.startswith('win'):
+ self.os_version = self._determine_win_version(self._win_version_tuple(sys_module))
+
+ def is_mac(self):
+ return self.os_name == 'mac'
+
+ def is_win(self):
+ return self.os_name == 'win'
+
+ def is_linux(self):
+ return self.os_name == 'linux'
def display_name(self):
# platform.platform() returns Darwin information for Mac, which is just confusing.
- if platform.system() == "Darwin":
- return "Mac OS X %s" % platform.mac_ver()[0]
+ if self.is_mac():
+ return "Mac OS X %s" % self._platform_module.mac_ver()[0]
# Returns strings like:
# Linux-2.6.18-194.3.1.el5-i686-with-redhat-5.5-Final
# Windows-2008ServerR2-6.1.7600
- return platform.platform()
+ return self._platform_module.platform()
+
+ def free_bytes_memory(self):
+ if self.is_mac():
+ vm_stat_output = self._executive.run_command(["vm_stat"])
+ free_bytes = self._compute_bytes_from_vm_stat_output("Pages free", vm_stat_output)
+ # Per https://bugs.webkit.org/show_bug.cgi?id=74650 include inactive memory since the OS is lazy about freeing memory.
+ free_bytes += self._compute_bytes_from_vm_stat_output("Pages inactive", vm_stat_output)
+ return free_bytes
+ return None
def total_bytes_memory(self):
- system_name = platform.system()
- if system_name == "Darwin":
+ if self.is_mac():
return int(self._executive.run_command(["sysctl", "-n", "hw.memsize"]))
return None
+ def _determine_os_name(self, sys_platform):
+ if sys_platform == 'darwin':
+ return 'mac'
+ if sys_platform.startswith('linux'):
+ return 'linux'
+ if sys_platform in ('win32', 'cygwin'):
+ return 'win'
+ raise AssertionError('unrecognized platform string "%s"' % sys_platform)
+
+ def _determine_mac_version(self, mac_version_string):
+ release_version = mac_version_string.split('.')[1]
+ version_strings = {
+ '5': 'leopard',
+ '6': 'snowleopard',
+ '7': 'lion',
+ }
+ assert release_version >= min(version_strings.keys())
+ return version_strings.get(release_version, 'future')
+
+ def _determine_linux_version(self):
+ # FIXME: we ignore whatever the real version is and pretend it's lucid for now.
+ return 'lucid'
+
+ def _determine_win_version(self, win_version_tuple):
+ if win_version_tuple[:3] == (6, 1, 7600):
+ return '7sp0'
+ if win_version_tuple[:2] == (6, 0):
+ return 'vista'
+ if win_version_tuple[:2] == (5, 1):
+ return 'xp'
+ assert win_version_tuple[0] > 6 or win_version_tuple[1] >= 1, 'Unrecognized Windows version tuple: "%s"' % (win_version_tuple,)
+ return 'future'
+
+ def _win_version_tuple(self, sys_module):
+ if hasattr(sys_module, 'getwindowsversion'):
+ return sys_module.getwindowsversion()
+ return self._win_version_tuple_from_cmd()
+
+ def _win_version_tuple_from_cmd(self):
+ # Note that this should only ever be called on windows, so this should always work.
+ ver_output = self._executive.run_command(['cmd', '/c', 'ver'])
+ match_object = re.search(r'(?P<major>\d)\.(?P<minor>\d)\.(?P<build>\d+)', ver_output)
+ assert match_object, 'cmd returned an unexpected version string: ' + ver_output
+ return tuple(map(int, match_object.groups()))
+
def _compute_bytes_from_vm_stat_output(self, label_text, vm_stat_output):
page_size_match = re.search(r"page size of (\d+) bytes", vm_stat_output)
free_pages_match = re.search(r"%s:\s+(\d+)." % label_text, vm_stat_output)
- if not page_size_match or not free_pages_match:
- return None
+
+ # Fail hard if vmstat's output isn't what we expect.
+ assert(page_size_match and free_pages_match)
+
free_page_count = int(free_pages_match.group(1))
page_size = int(page_size_match.group(1))
return free_page_count * page_size
-
- def free_bytes_memory(self):
- system_name = platform.system()
- if system_name == "Darwin":
- vm_stat_output = self._executive.run_command(["vm_stat"])
- free_bytes = self._compute_bytes_from_vm_stat_output("Pages free", vm_stat_output)
- # Per https://bugs.webkit.org/show_bug.cgi?id=74650 include inactive memory since the OS is lazy about freeing memory.
- free_bytes += self._compute_bytes_from_vm_stat_output("Pages inactive", vm_stat_output)
- return free_bytes
- return None
diff --git a/Tools/Scripts/webkitpy/common/system/platforminfo_mock.py b/Tools/Scripts/webkitpy/common/system/platforminfo_mock.py
index 14fedd062..71c3e8ce7 100644
--- a/Tools/Scripts/webkitpy/common/system/platforminfo_mock.py
+++ b/Tools/Scripts/webkitpy/common/system/platforminfo_mock.py
@@ -28,6 +28,18 @@
class MockPlatformInfo(object):
+ os_name = 'mac'
+ os_version = 'snowleopard'
+
+ def is_mac(self):
+ return True
+
+ def is_linux(self):
+ return False
+
+ def is_windows(self):
+ return False
+
def display_name(self):
return "MockPlatform 1.0"
diff --git a/Tools/Scripts/webkitpy/common/system/platforminfo_unittest.py b/Tools/Scripts/webkitpy/common/system/platforminfo_unittest.py
new file mode 100644
index 000000000..ac9cfb0d7
--- /dev/null
+++ b/Tools/Scripts/webkitpy/common/system/platforminfo_unittest.py
@@ -0,0 +1,174 @@
+# 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.
+
+import platform
+import sys
+import unittest
+
+from webkitpy.common.system.executive import Executive
+from webkitpy.common.system.executive_mock import MockExecutive, MockExecutive2
+from webkitpy.common.system.platforminfo import PlatformInfo
+
+
+def fake_sys(platform_str='darwin', windows_version_tuple=None):
+
+ class FakeSysModule(object):
+ platform = platform_str
+ if windows_version_tuple:
+ getwindowsversion = lambda x: windows_version_tuple
+
+ return FakeSysModule()
+
+
+def fake_platform(mac_version_string='10.6.3'):
+
+ class FakePlatformModule(object):
+ def mac_ver(self):
+ return tuple([mac_version_string, tuple(['', '', '']), 'i386'])
+
+ def platform(self):
+ return 'foo'
+
+ return FakePlatformModule()
+
+
+def fake_executive(output=None):
+ if output:
+ return MockExecutive2(output=output)
+ return MockExecutive2(exception=SystemError)
+
+
+class TestPlatformInfo(unittest.TestCase):
+ def make_info(self, sys_module=None, platform_module=None, executive=None):
+ return PlatformInfo(sys_module or fake_sys(), platform_module or fake_platform(), executive or fake_executive())
+
+ # FIXME: This should be called integration_test_real_code(), but integration tests aren't
+ # yet run by default and there's no reason not to run this everywhere by default.
+ def test_real_code(self):
+ # This test makes sure the real (unmocked) code actually works.
+ info = PlatformInfo(sys, platform, Executive())
+ self.assertNotEquals(info.os_name, '')
+ self.assertNotEquals(info.os_version, '')
+ self.assertNotEquals(info.display_name(), '')
+ self.assertTrue(info.is_mac() or info.is_win() or info.is_linux())
+
+ if info.is_mac():
+ self.assertTrue(info.total_bytes_memory() > 0)
+ self.assertTrue(info.free_bytes_memory() > 0)
+ else:
+ self.assertEquals(info.total_bytes_memory(), None)
+ self.assertEquals(info.free_bytes_memory(), None)
+
+ def test_os_name_and_wrappers(self):
+ info = self.make_info(fake_sys('linux2'))
+ self.assertTrue(info.is_linux())
+ self.assertFalse(info.is_mac())
+ self.assertFalse(info.is_win())
+
+ info = self.make_info(fake_sys('linux3'))
+ self.assertTrue(info.is_linux())
+ self.assertFalse(info.is_mac())
+ self.assertFalse(info.is_win())
+
+ info = self.make_info(fake_sys('darwin'), fake_platform('10.6.3'))
+ self.assertEquals(info.os_name, 'mac')
+ self.assertFalse(info.is_linux())
+ self.assertTrue(info.is_mac())
+ self.assertFalse(info.is_win())
+
+ info = self.make_info(fake_sys('win32', tuple([6, 1, 7600])))
+ self.assertEquals(info.os_name, 'win')
+ self.assertFalse(info.is_linux())
+ self.assertFalse(info.is_mac())
+ self.assertTrue(info.is_win())
+
+ info = self.make_info(fake_sys('cygwin'), executive=fake_executive('6.1.7600'))
+ self.assertEquals(info.os_name, 'win')
+ self.assertFalse(info.is_linux())
+ self.assertFalse(info.is_mac())
+ self.assertTrue(info.is_win())
+
+ self.assertRaises(AssertionError, self.make_info, fake_sys('vms'))
+
+ def test_os_version(self):
+ self.assertRaises(AssertionError, self.make_info, fake_sys('darwin'), fake_platform('10.4.3'))
+ self.assertEquals(self.make_info(fake_sys('darwin'), fake_platform('10.5.1')).os_version, 'leopard')
+ self.assertEquals(self.make_info(fake_sys('darwin'), fake_platform('10.6.1')).os_version, 'snowleopard')
+ self.assertEquals(self.make_info(fake_sys('darwin'), fake_platform('10.7.1')).os_version, 'lion')
+ self.assertEquals(self.make_info(fake_sys('darwin'), fake_platform('10.8.0')).os_version, 'future')
+
+ self.assertEquals(self.make_info(fake_sys('linux2')).os_version, 'lucid')
+
+ self.assertRaises(AssertionError, self.make_info, fake_sys('win32', tuple([5, 0, 1234])))
+ self.assertEquals(self.make_info(fake_sys('win32', tuple([6, 2, 1234]))).os_version, 'future')
+ self.assertEquals(self.make_info(fake_sys('win32', tuple([6, 1, 7600]))).os_version, '7sp0')
+ self.assertEquals(self.make_info(fake_sys('win32', tuple([6, 0, 1234]))).os_version, 'vista')
+ self.assertEquals(self.make_info(fake_sys('win32', tuple([5, 1, 1234]))).os_version, 'xp')
+
+ self.assertRaises(AssertionError, self.make_info, fake_sys('win32'), executive=fake_executive('5.0.1234'))
+ self.assertEquals(self.make_info(fake_sys('cygwin'), executive=fake_executive('6.2.1234')).os_version, 'future')
+ self.assertEquals(self.make_info(fake_sys('cygwin'), executive=fake_executive('6.1.7600')).os_version, '7sp0')
+ self.assertEquals(self.make_info(fake_sys('cygwin'), executive=fake_executive('6.0.1234')).os_version, 'vista')
+ self.assertEquals(self.make_info(fake_sys('cygwin'), executive=fake_executive('5.1.1234')).os_version, 'xp')
+
+ def test_display_name(self):
+ info = self.make_info(fake_sys('darwin'))
+ self.assertNotEquals(info.display_name(), '')
+
+ info = self.make_info(fake_sys('win32', tuple([6, 1, 7600])))
+ self.assertNotEquals(info.display_name(), '')
+
+ info = self.make_info(fake_sys('linux2'))
+ self.assertNotEquals(info.display_name(), '')
+
+ def test_total_bytes_memory(self):
+ info = self.make_info(fake_sys('darwin'), fake_platform('10.6.3'), fake_executive('1234'))
+ self.assertEquals(info.total_bytes_memory(), 1234)
+
+ info = self.make_info(fake_sys('win32', tuple([6, 1, 7600])))
+ self.assertEquals(info.total_bytes_memory(), None)
+
+ info = self.make_info(fake_sys('linux2'))
+ self.assertEquals(info.total_bytes_memory(), None)
+
+ def test_free_bytes_memory(self):
+ vmstat_output = ("Mach Virtual Memory Statistics: (page size of 4096 bytes)\n"
+ "Pages free: 1.\n"
+ "Pages inactive: 1.\n")
+ info = self.make_info(fake_sys('darwin'), fake_platform('10.6.3'), fake_executive(vmstat_output))
+ self.assertEquals(info.free_bytes_memory(), 8192)
+
+ info = self.make_info(fake_sys('win32', tuple([6, 1, 7600])))
+ self.assertEquals(info.free_bytes_memory(), None)
+
+ info = self.make_info(fake_sys('linux2'))
+ self.assertEquals(info.free_bytes_memory(), None)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/Tools/Scripts/webkitpy/common/system/systemhost.py b/Tools/Scripts/webkitpy/common/system/systemhost.py
index 9b84bbd43..3b4439ee4 100644
--- a/Tools/Scripts/webkitpy/common/system/systemhost.py
+++ b/Tools/Scripts/webkitpy/common/system/systemhost.py
@@ -27,6 +27,8 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import os
+import platform
+import sys
from webkitpy.common.system import environment, executive, filesystem, platforminfo, user, workspace
@@ -36,7 +38,7 @@ class SystemHost(object):
self.executive = executive.Executive()
self.filesystem = filesystem.FileSystem()
self.user = user.User()
- self.platform = platforminfo.PlatformInfo(self.executive)
+ self.platform = platforminfo.PlatformInfo(sys, platform, self.executive)
self.workspace = workspace.Workspace(self.filesystem, self.executive)
def copy_current_environment(self):
diff --git a/Tools/Scripts/webkitpy/common/version_check.py b/Tools/Scripts/webkitpy/common/version_check.py
new file mode 100644
index 000000000..290623d32
--- /dev/null
+++ b/Tools/Scripts/webkitpy/common/version_check.py
@@ -0,0 +1,34 @@
+#!/usr/bin/env python
+# 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.
+
+import sys
+
+if sys.version < '2.5' or sys.version >= '2.8':
+ print >> sys.stderr, "Unsupported Python version: WebKit only supports 2.5.x - 2.7.x, and you're running %s." % sys.version.split()[0]
+ sys.exit(1)
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
index 129a26ce0..cf97b3425 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
@@ -789,10 +789,8 @@ class TestExpectations(object):
warnings.append(warning)
if len(errors) or len(warnings):
- webkit_base_path = self._port.webkit_base()
test_expectation_path = self._port.path_to_test_expectations_file()
- test_expectation_relative_path = test_expectation_path[len(webkit_base_path):].lstrip('/')
- failure_title = "FAILURES FOR %s in %s" % (str(self._test_config), test_expectation_relative_path)
+ failure_title = "FAILURES FOR %s in %s" % (str(self._test_config), test_expectation_path)
_log.error(failure_title)
for error in errors:
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
index 346300adc..647305307 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
@@ -199,7 +199,7 @@ SKIP : failures/expected/image.html""")
self.assertFalse(True, "ParseError wasn't raised")
except ParseError, e:
self.assertTrue(e.fatal)
- exp_errors = [u"FAILURES FOR %s in LayoutTests/platform/test/test_expectations.txt" % self._port.test_configuration(),
+ exp_errors = [u"FAILURES FOR %s in %s" % (self._port.test_configuration(), self._port.path_to_test_expectations_file()),
u"Line:1 Unrecognized modifier 'foo' failures/expected/text.html",
u"Line:2 Missing expectations SKIP : failures/expected/image.html"]
self.assertEqual(str(e), '\n'.join(map(str, exp_errors)))
@@ -212,7 +212,7 @@ SKIP : failures/expected/image.html""")
self.assertFalse(True, "ParseError wasn't raised")
except ParseError, e:
self.assertFalse(e.fatal)
- exp_errors = [u'FAILURES FOR %s in LayoutTests/platform/test/test_expectations.txt' % self._port.test_configuration(),
+ exp_errors = [u'FAILURES FOR %s in %s' % (self._port.test_configuration(), self._port.path_to_test_expectations_file()),
u'Line:1 Test lacks BUG modifier. failures/expected/text.html']
self.assertEqual(str(e), '\n'.join(map(str, exp_errors)))
self.assertEqual(e.errors, exp_errors)
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/apple.py b/Tools/Scripts/webkitpy/layout_tests/port/apple.py
index 29ca987b5..0229f7e21 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/apple.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/apple.py
@@ -67,6 +67,7 @@ class ApplePort(WebKitPort):
self.set_option_default('webkit_test_runner', True)
if port_name == self.port_name:
+ # FIXME: Use host.platforminfo.os_version instead.
self._version = self._detect_version(os_version_string) or self.FUTURE_VERSION
self._name = self.port_name + '-' + self._version
else:
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/base.py b/Tools/Scripts/webkitpy/layout_tests/port/base.py
index b44c24d42..48c78da20 100755
--- a/Tools/Scripts/webkitpy/layout_tests/port/base.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/base.py
@@ -39,6 +39,7 @@ import os
import re
from webkitpy.common.memoized import memoized
+from webkitpy.common.system import path
# Handle Python < 2.6 where multiprocessing isn't available.
@@ -49,7 +50,6 @@ except ImportError:
from webkitpy.common import find_files
from webkitpy.common.system import logutils
-from webkitpy.common.system import path
from webkitpy.common.system.executive import ScriptError
from webkitpy.common.system.systemhost import SystemHost
from webkitpy.layout_tests import read_checksum_from_png
@@ -236,7 +236,10 @@ class Port(object):
try:
server_name = self._filesystem.basename(httpd_path)
env = self.setup_environ_for_server(server_name)
- return self._executive.run_command([httpd_path, "-v"], env=env, return_exit_code=True) == 0
+ if self._executive.run_command([httpd_path, "-v"], env=env, return_exit_code=True) != 0:
+ _log.error("httpd seems broken. Cannot run http tests.")
+ return False
+ return True
except OSError:
_log.error("No httpd found. Cannot run http tests.")
return False
@@ -461,33 +464,6 @@ class Port(object):
filename = self._filesystem.join(self.layout_tests_dir(), test_name)
return filename in reftest_list
- def test_to_uri(self, test_name):
- """Convert a test name to a URI."""
- LAYOUTTEST_HTTP_DIR = "http/tests/"
- LAYOUTTEST_WEBSOCKET_DIR = "http/tests/websocket/tests/"
-
- port = None
-
- relative_path = test_name
- if (relative_path.startswith(LAYOUTTEST_WEBSOCKET_DIR)
- or relative_path.startswith(LAYOUTTEST_HTTP_DIR)):
- relative_path = relative_path[len(LAYOUTTEST_HTTP_DIR):]
- port = 8000
-
- # Make http/tests/local run as local files. This is to mimic the
- # logic in run-webkit-tests.
- #
- # TODO(dpranke): remove the SSL reference?
- if (port and not relative_path.startswith("local/")):
- if relative_path.startswith("ssl/"):
- port += 443
- protocol = "https"
- else:
- protocol = "http"
- return "%s://127.0.0.1:%u/%s" % (protocol, port, relative_path)
-
- return path.abspath_to_uri(self.abspath_for_test(test_name))
-
def tests(self, paths):
"""Return the list of tests found."""
# When collecting test cases, skip these directories
@@ -567,32 +543,6 @@ class Port(object):
"""
self._filesystem.write_binary_file(baseline_path, data)
- def uri_to_test_name(self, uri):
- """Return the base layout test name for a given URI.
-
- This returns the test name for a given URI, e.g., if you passed in
- "file:///src/LayoutTests/fast/html/keygen.html" it would return
- "fast/html/keygen.html".
-
- """
- test = uri
- if uri.startswith("file:///"):
- prefix = path.abspath_to_uri(self.layout_tests_dir()) + "/"
- return test[len(prefix):]
-
- if uri.startswith("http://127.0.0.1:8880/"):
- # websocket tests
- return test.replace('http://127.0.0.1:8880/', '')
-
- if uri.startswith("http://"):
- # regular HTTP test
- return test.replace('http://127.0.0.1:8000/', 'http/tests/')
-
- if uri.startswith("https://"):
- return test.replace('https://127.0.0.1:8443/', 'http/tests/')
-
- raise NotImplementedError('unknown url type: %s' % uri)
-
def layout_tests_dir(self):
"""Return the absolute path to the top of the LayoutTests directory."""
return self.path_from_webkit_base('LayoutTests')
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py
index 93c180e02..471f409a4 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py
@@ -26,6 +26,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+import logging
import optparse
import sys
import tempfile
@@ -38,7 +39,7 @@ from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.common.system.path import abspath_to_uri
from webkitpy.thirdparty.mock import Mock
from webkitpy.tool.mocktool import MockOptions
-from webkitpy.common.system.executive_mock import MockExecutive
+from webkitpy.common.system.executive_mock import MockExecutive, MockExecutive2
from webkitpy.common.host_mock import MockHost
from webkitpy.layout_tests.port import Port, Driver, DriverOutput
@@ -226,16 +227,6 @@ class PortTest(unittest.TestCase):
self.assertTrue('canvas' in dirs)
self.assertTrue('css2.1' in dirs)
- def test_test_to_uri(self):
- port = self.make_port()
- layout_test_dir = port.layout_tests_dir()
- test = 'foo/bar.html'
- path = port._filesystem.join(layout_test_dir, test)
- if sys.platform == 'win32':
- path = path.replace("\\", "/")
-
- self.assertEqual(port.test_to_uri(test), abspath_to_uri(path))
-
def test_get_option__set(self):
options, args = optparse.OptionParser().parse_args([])
options.foo = 'bar'
@@ -351,6 +342,24 @@ class PortTest(unittest.TestCase):
def test_operating_system(self):
self.assertEqual('mac', self.make_port().operating_system())
+ def test_check_httpd_success(self):
+ port = self.make_port(executive=MockExecutive2())
+ port._path_to_apache = lambda: '/usr/sbin/httpd'
+ capture = OutputCapture()
+ capture.capture_output()
+ self.assertTrue(port.check_httpd())
+ _, _, logs = capture.restore_output()
+ self.assertEqual('', logs)
+
+ def test_httpd_returns_error_code(self):
+ port = self.make_port(executive=MockExecutive2(exit_code=1))
+ port._path_to_apache = lambda: '/usr/sbin/httpd'
+ capture = OutputCapture()
+ capture.capture_output()
+ self.assertFalse(port.check_httpd())
+ _, _, logs = capture.restore_output()
+ self.assertEqual('httpd seems broken. Cannot run http tests.\n', logs)
+
class VirtualTest(unittest.TestCase):
"""Tests that various methods expected to be virtual are."""
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/builders.py b/Tools/Scripts/webkitpy/layout_tests/port/builders.py
index 316e003d0..f05baf9ad 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/builders.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/builders.py
@@ -51,18 +51,11 @@ _exact_matches = {
"Webkit Mac10.5 (dbg)(2)": {"port_name": "chromium-mac-leopard", "specifiers": set(["leopard", "debug"])},
"Webkit Mac10.6": {"port_name": "chromium-mac-snowleopard", "specifiers": set(["snowleopard"])},
"Webkit Mac10.6 (dbg)": {"port_name": "chromium-mac-snowleopard", "specifiers": set(["snowleopard", "debug"])},
- "Webkit Mac10.5 (CG)": {"port_name": "chromium-cg-mac-leopard", "specifiers": set(["leopard"])},
- "Webkit Mac10.5 (CG)(dbg)(1)": {"port_name": "chromium-cg-mac-leopard", "specifiers": set(["leopard", "debug"])},
- "Webkit Mac10.5 (CG)(dbg)(2)": {"port_name": "chromium-cg-mac-leopard", "specifiers": set(["leopard", "debug"])},
- "Webkit Mac10.6 (CG)": {"port_name": "chromium-cg-mac-snowleopard", "specifiers": set(["snowleopard"])},
- "Webkit Mac10.6 (CG)(dbg)": {"port_name": "chromium-cg-mac-snowleopard", "specifiers": set(["snowleopard", "debug"])},
"Webkit Win - GPU": {"port_name": "chromium-gpu-win-xp", "specifiers": set(["xp", "release", "gpu"])},
"Webkit Win7 - GPU": {"port_name": "chromium-gpu-win-win7", "specifiers": set(["win7", "vista", "release", "gpu"])},
# FIXME: For some reason, these port names don't work correctly.
# "Webkit Linux - GPU": {"port_name": "chromium-gpu-linux-x86_64", "specifiers": set(["linux", "gpu"])},
# "Webkit Linux 32 - GPU": {"port_name": "chromium-gpu-linux-x86", "specifiers": set(["linux", "x86", "gpu"])},
- "Webkit Mac10.5 (CG) - GPU": {"port_name": "chromium-gpu-cg-mac-leopard", "specifiers": set(["leopard", "gpu"])},
- "Webkit Mac10.6 (CG) - GPU": {"port_name": "chromium-gpu-cg-mac-snowleopard", "specifiers": set(["mac", "gpu"])},
"Webkit Mac10.6 (dbg) - GPU": {"port_name": "chromium-gpu-mac-snowleopard", "specifiers": set(["snowleopard", "gpu", "debug"])},
"Webkit Mac10.6 - GPU": {"port_name": "chromium-gpu-mac-snowleopard", "specifiers": set(["snowleopard", "gpu"])},
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium.py
index 08d6010cb..a6f61123d 100755
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium.py
@@ -71,12 +71,9 @@ class ChromiumPort(Port):
('lucid', 'x86_64'))
ALL_GRAPHICS_TYPES = ('cpu', 'gpu')
- CORE_GRAPHICS_VERSIONS = ('leopard', 'snowleopard', 'lion')
- CORE_GRAPHICS_TYPES = ('cpu-cg', 'gpu-cg')
ALL_BASELINE_VARIANTS = [
'chromium-mac-lion', 'chromium-mac-snowleopard', 'chromium-mac-leopard',
- 'chromium-cg-mac-lion', 'chromium-cg-mac-snowleopard', 'chromium-cg-mac-leopard',
'chromium-win-win7', 'chromium-win-vista', 'chromium-win-xp',
'chromium-linux-x86_64', 'chromium-linux-x86',
'chromium-gpu-mac-snowleopard', 'chromium-gpu-win-win7', 'chromium-gpu-linux-x86_64',
@@ -297,9 +294,6 @@ class ChromiumPort(Port):
for build_type in self.ALL_BUILD_TYPES:
for graphics_type in self.ALL_GRAPHICS_TYPES:
test_configurations.append(TestConfiguration(version, architecture, build_type, graphics_type))
- if version in self.CORE_GRAPHICS_VERSIONS:
- for graphics_type in self.CORE_GRAPHICS_TYPES:
- test_configurations.append(TestConfiguration(version, architecture, build_type, graphics_type))
return test_configurations
try_builder_names = frozenset([
@@ -524,7 +518,7 @@ class ChromiumDriver(Driver):
has_audio = False
has_base64 = False
- uri = self._port.test_to_uri(driver_input.test_name)
+ uri = self.test_to_uri(driver_input.test_name)
cmd = self._test_shell_command(uri, driver_input.timeout, driver_input.image_hash)
line, crash = self._write_command_and_read_line(input=cmd)
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu.py
index 3e9ded686..8b4145e20 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu.py
@@ -50,18 +50,14 @@ def _set_gpu_options(port, graphics_type='gpu'):
def _default_tests_paths(port):
paths = []
- if (port.name() != 'chromium-gpu-mac-leopard' and
- port.name() != 'chromium-gpu-cg-mac-leopard'):
+ if port.name() != 'chromium-gpu-mac-leopard':
# Only run tests requiring accelerated compositing on platforms that
# support it.
# FIXME: we should add the above paths here as well but let's test
# the waters with media first.
paths += ['media']
- if not port.name().startswith('chromium-gpu-cg-mac'):
- # Canvas is not yet accelerated on the Mac, so there's no point
- # in running the tests there.
- paths += ['fast/canvas', 'canvas/philip']
+ paths += ['fast/canvas', 'canvas/philip']
if not paths:
# FIXME: This is a hack until we can turn off the webkit_gpu
@@ -89,20 +85,6 @@ class ChromiumGpuLinuxPort(chromium_linux.ChromiumLinuxPort):
return chromium_linux.ChromiumLinuxPort.tests(self, paths)
-class ChromiumGpuCgMacPort(chromium_mac.ChromiumMacPort):
- def __init__(self, host, port_name='chromium-gpu-cg-mac', **kwargs):
- chromium_mac.ChromiumMacPort.__init__(self, host, port_name=port_name, **kwargs)
- _set_gpu_options(self, graphics_type='gpu-cg')
-
- def baseline_search_path(self):
- return (map(self._webkit_baseline_path, ['chromium-gpu-cg-mac', 'chromium-gpu']) +
- chromium_mac.ChromiumMacPort.baseline_search_path(self))
-
- def tests(self, paths):
- paths = paths or _default_tests_paths(self)
- return chromium_mac.ChromiumMacPort.tests(self, paths)
-
-
class ChromiumGpuMacPort(chromium_mac.ChromiumMacPort):
def __init__(self, host, port_name='chromium-gpu-mac', **kwargs):
chromium_mac.ChromiumMacPort.__init__(self, host, port_name=port_name, **kwargs)
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu_unittest.py
index 965fb586d..72ad181a2 100755
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu_unittest.py
@@ -42,10 +42,8 @@ class ChromiumGpuTest(unittest.TestCase):
self.assert_port_works('chromium-gpu-linux', 'chromium-gpu', 'linux3')
def integration_test_chromium_gpu_mac(self):
- self.assert_port_works('chromium-gpu-cg-mac')
self.assert_port_works('chromium-gpu-mac')
- # For now, chromium-gpu on Mac defaults to the chromium-gpu-cg-mac port.
- self.assert_port_works('chromium-gpu-cg-mac', 'chromium-gpu', 'darwin')
+ self.assert_port_works('chromium-gpu-mac', 'chromium-gpu', 'darwin')
def integration_test_chromium_gpu_win(self):
self.assert_port_works('chromium-gpu-win')
@@ -91,10 +89,6 @@ class ChromiumGpuTest(unittest.TestCase):
path = 'fast/html/keygen.html'
self.assertTrue(port._filesystem.exists(port.abspath_for_test(path)))
self.assertFalse(path in files)
- if port_name.startswith('chromium-gpu-cg-mac'):
- path = 'fast/canvas/set-colors.html'
- self.assertTrue(port._filesystem.exists(port.abspath_for_test(path)))
- self.assertFalse(path in files)
def _assert_baseline_path(self, port_name, baseline_path):
host = MockHost()
@@ -106,13 +100,9 @@ class ChromiumGpuTest(unittest.TestCase):
self._assert_baseline_path('chromium-gpu-win-vista', 'chromium-gpu-win')
self._assert_baseline_path('chromium-gpu-win-xp', 'chromium-gpu-win')
self._assert_baseline_path('chromium-gpu-win-win7', 'chromium-gpu-win')
- self._assert_baseline_path('chromium-gpu-cg-mac-leopard', 'chromium-gpu-cg-mac')
- self._assert_baseline_path('chromium-gpu-cg-mac-snowleopard', 'chromium-gpu-cg-mac')
def test_graphics_type(self):
host = MockHost()
- port = host.port_factory.get('chromium-gpu-cg-mac')
- self.assertEquals('gpu-cg', port.graphics_type())
port = host.port_factory.get('chromium-gpu-mac')
self.assertEquals('gpu', port.graphics_type())
@@ -124,7 +114,6 @@ class ChromiumGpuTest(unittest.TestCase):
self.assertEqual(test_paths('chromium-gpu-linux'), ['media', 'fast/canvas', 'canvas/philip'])
self.assertEqual(test_paths('chromium-gpu-mac-leopard'), ['fast/canvas', 'canvas/philip'])
- self.assertEqual(test_paths('chromium-gpu-cg-mac-leopard'), ['fast/html'])
def test_test_files(self):
host = MockHost()
@@ -142,7 +131,6 @@ class ChromiumGpuTest(unittest.TestCase):
self.assertEqual(test_paths('chromium-gpu-linux'), set(['canvas/philip/test.html', 'fast/canvas/test.html', 'media/test.html']))
self.assertEqual(test_paths('chromium-gpu-mac-leopard'), set(['canvas/philip/test.html', 'fast/canvas/test.html']))
- self.assertEqual(test_paths('chromium-gpu-cg-mac-leopard'), set(['fast/html/test.html']))
if __name__ == '__main__':
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
index ef036cff4..c17ab3e13 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
@@ -77,59 +77,21 @@ class ChromiumMacPort(chromium.ChromiumPort):
],
}
- FALLBACK_PATHS_CG = {
- 'leopard': [
- 'chromium-cg-mac-leopard',
- 'chromium-cg-mac-snowleopard',
- 'chromium-cg-mac',
- 'chromium',
- 'mac-leopard',
- 'mac-snowleopard',
- 'mac-lion',
- 'mac',
- ],
- 'snowleopard': [
- 'chromium-cg-mac-snowleopard',
- 'chromium-cg-mac',
- 'chromium',
- 'mac-snowleopard',
- 'mac-lion',
- 'mac',
- ],
- 'lion': [
- 'chromium-cg-mac',
- 'chromium',
- 'mac-lion',
- 'mac',
- ],
- 'future': [
- 'chromium-cg-mac',
- 'chromium',
- 'mac',
- ],
- }
-
def __init__(self, host, port_name=None, os_version_string=None, **kwargs):
# We're a little generic here because this code is reused by the
# 'google-chrome' port as well as the 'mock-' and 'dryrun-' ports.
port_name = port_name or 'chromium-mac'
chromium.ChromiumPort.__init__(self, host, port_name=port_name, **kwargs)
if port_name.endswith('-mac'):
+ # FIXME: Use host.platforminfo.os_version instead.
self._version = mac.os_version(os_version_string, self.SUPPORTED_OS_VERSIONS)
self._name = port_name + '-' + self._version
else:
self._version = port_name[port_name.index('-mac-') + len('-mac-'):]
assert self._version in self.SUPPORTED_OS_VERSIONS
- self._using_core_graphics = port_name.find('-cg-') != -1
- if self._using_core_graphics:
- self._graphics_type = 'cpu-cg'
- else:
- self._graphics_type = 'cpu'
def baseline_search_path(self):
fallback_paths = self.FALLBACK_PATHS
- if self._using_core_graphics:
- fallback_paths = self.FALLBACK_PATHS_CG
return map(self._webkit_baseline_path, fallback_paths[self._version])
def check_build(self, needs_http):
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py
index b21142c42..052df1bfa 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py
@@ -80,7 +80,6 @@ class ChromiumMacPortTest(port_testcase.PortTestCase):
self.assertEquals(port.baseline_path(), port._webkit_baseline_path('chromium-mac'))
def test_graphics_type(self):
- self.assertEquals('cpu-cg', self.make_port(port_name='chromium-cg-mac').graphics_type())
self.assertEquals('cpu', self.make_port(port_name='chromium-mac').graphics_type())
# Mac defaults to cpu graphics type.
self.assertEquals('cpu', self.make_port().graphics_type())
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py
index 2e3d74e64..84061a8eb 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py
@@ -98,7 +98,7 @@ class ChromiumDriverTest(unittest.TestCase):
raise IOError
self.driver._proc.stdout.readline = mock_readline
- self.driver._port.test_to_uri = lambda test: 'mocktesturi'
+ self.driver.test_to_uri = lambda test: 'mocktesturi'
driver_output = self.driver.run_test(DriverInput(test_name='some/test.html', timeout=1, image_hash=None, is_reftest=False))
self.assertEqual(self.driver._port.driver_name(), driver_output.crashed_process_name)
@@ -162,28 +162,16 @@ class ChromiumPortTest(port_testcase.PortTestCase):
self.assertEquals(set(port.all_test_configurations()), set([
TestConfiguration('leopard', 'x86', 'debug', 'cpu'),
TestConfiguration('leopard', 'x86', 'debug', 'gpu'),
- TestConfiguration('leopard', 'x86', 'debug', 'cpu-cg'),
- TestConfiguration('leopard', 'x86', 'debug', 'gpu-cg'),
TestConfiguration('leopard', 'x86', 'release', 'cpu'),
TestConfiguration('leopard', 'x86', 'release', 'gpu'),
- TestConfiguration('leopard', 'x86', 'release', 'cpu-cg'),
- TestConfiguration('leopard', 'x86', 'release', 'gpu-cg'),
TestConfiguration('snowleopard', 'x86', 'debug', 'cpu'),
TestConfiguration('snowleopard', 'x86', 'debug', 'gpu'),
- TestConfiguration('snowleopard', 'x86', 'debug', 'cpu-cg'),
- TestConfiguration('snowleopard', 'x86', 'debug', 'gpu-cg'),
TestConfiguration('snowleopard', 'x86', 'release', 'cpu'),
TestConfiguration('snowleopard', 'x86', 'release', 'gpu'),
- TestConfiguration('snowleopard', 'x86', 'release', 'cpu-cg'),
- TestConfiguration('snowleopard', 'x86', 'release', 'gpu-cg'),
TestConfiguration('lion', 'x86', 'debug', 'cpu'),
TestConfiguration('lion', 'x86', 'debug', 'gpu'),
- TestConfiguration('lion', 'x86', 'debug', 'cpu-cg'),
- TestConfiguration('lion', 'x86', 'debug', 'gpu-cg'),
TestConfiguration('lion', 'x86', 'release', 'cpu'),
TestConfiguration('lion', 'x86', 'release', 'gpu'),
- TestConfiguration('lion', 'x86', 'release', 'cpu-cg'),
- TestConfiguration('lion', 'x86', 'release', 'gpu-cg'),
TestConfiguration('xp', 'x86', 'debug', 'cpu'),
TestConfiguration('xp', 'x86', 'debug', 'gpu'),
TestConfiguration('xp', 'x86', 'release', 'cpu'),
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/driver.py b/Tools/Scripts/webkitpy/layout_tests/port/driver.py
index f8c414899..93125bec2 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/driver.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/driver.py
@@ -28,6 +28,8 @@
import shlex
+from webkitpy.common.system import path
+
class DriverInput(object):
def __init__(self, test_name, timeout, image_hash, is_reftest):
@@ -91,6 +93,40 @@ class Driver(object):
# used by e.g. tools/valgrind/valgrind_tests.py.
return shlex.split(wrapper_option) if wrapper_option else []
+ HTTP_DIR = "http/tests/"
+ HTTP_LOCAL_DIR = "http/tests/local/"
+
+ def is_http_test(self, test_name):
+ return test_name.startswith(self.HTTP_DIR) and not test_name.startswith(self.HTTP_LOCAL_DIR)
+
+ def test_to_uri(self, test_name):
+ """Convert a test name to a URI."""
+ if not self.is_http_test(test_name):
+ return path.abspath_to_uri(self._port.abspath_for_test(test_name))
+
+ relative_path = test_name[len(self.HTTP_DIR):]
+
+ # TODO(dpranke): remove the SSL reference?
+ if relative_path.startswith("ssl/"):
+ return "https://127.0.0.1:8443/" + relative_path
+ return "http://127.0.0.1:8000/" + relative_path
+
+ def uri_to_test(self, uri):
+ """Return the base layout test name for a given URI.
+
+ This returns the test name for a given URI, e.g., if you passed in
+ "file:///src/LayoutTests/fast/html/keygen.html" it would return
+ "fast/html/keygen.html".
+
+ """
+ if uri.startswith("file:///"):
+ return uri[len(path.abspath_to_uri(self._port.layout_tests_dir()) + "/"):]
+ if uri.startswith("http://"):
+ return uri.replace('http://127.0.0.1:8000/', self.HTTP_DIR)
+ if uri.startswith("https://"):
+ return uri.replace('https://127.0.0.1:8443/', self.HTTP_DIR)
+ raise NotImplementedError('unknown url type: %s' % uri)
+
def has_crashed(self):
return False
@@ -113,6 +149,15 @@ class DriverProxy(object):
else:
self._reftest_driver = driver_instance_constructor(port, worker_number, pixel_tests=True)
+ def is_http_test(self, test_name):
+ return self._driver.is_http_test(test_name)
+
+ def test_to_uri(self, test_name):
+ return self._driver.test_to_uri(test_name)
+
+ def uri_to_test(self, uri):
+ return self._driver.uri_to_test(uri)
+
def run_test(self, driver_input):
if driver_input.is_reftest:
return self._reftest_driver.run_test(driver_input)
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/driver_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/driver_unittest.py
new file mode 100644
index 000000000..ad8359668
--- /dev/null
+++ b/Tools/Scripts/webkitpy/layout_tests/port/driver_unittest.py
@@ -0,0 +1,77 @@
+# Copyright (C) 2010 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.
+
+import sys
+import unittest
+
+from webkitpy.common.system.path import abspath_to_uri
+from webkitpy.common.host_mock import MockHost
+
+from webkitpy.layout_tests.port import Port, Driver, DriverOutput
+
+
+class DriverTest(unittest.TestCase):
+ def make_port(self):
+ return Port(MockHost())
+
+ def _assert_wrapper(self, wrapper_string, expected_wrapper):
+ wrapper = Driver(Port(MockHost()), None, pixel_tests=False)._command_wrapper(wrapper_string)
+ self.assertEqual(wrapper, expected_wrapper)
+
+ def test_command_wrapper(self):
+ self._assert_wrapper(None, [])
+ self._assert_wrapper("valgrind", ["valgrind"])
+
+ # Validate that shlex works as expected.
+ command_with_spaces = "valgrind --smc-check=\"check with spaces!\" --foo"
+ expected_parse = ["valgrind", "--smc-check=check with spaces!", "--foo"]
+ self._assert_wrapper(command_with_spaces, expected_parse)
+
+ def test_test_to_uri(self):
+ port = self.make_port()
+ driver = Driver(port, None, pixel_tests=False)
+ if sys.platform in ('cygwin', 'win32'):
+ self.assertEqual(driver.test_to_uri('foo/bar.html'), 'file:///%s/foo/bar.html' % port.layout_tests_dir())
+ else:
+ self.assertEqual(driver.test_to_uri('foo/bar.html'), 'file://%s/foo/bar.html' % port.layout_tests_dir())
+ self.assertEqual(driver.test_to_uri('http/tests/foo.html'), 'http://127.0.0.1:8000/foo.html')
+ self.assertEqual(driver.test_to_uri('http/tests/ssl/bar.html'), 'https://127.0.0.1:8443/ssl/bar.html')
+
+ def test_uri_to_test(self):
+ port = self.make_port()
+ driver = Driver(port, None, pixel_tests=False)
+ if sys.platform in ('cygwin', 'win32'):
+ self.assertEqual(driver.uri_to_test('file:///%s/foo/bar.html' % port.layout_tests_dir()), 'foo/bar.html')
+ else:
+ self.assertEqual(driver.uri_to_test('file://%s/foo/bar.html' % port.layout_tests_dir()), 'foo/bar.html')
+ self.assertEqual(driver.uri_to_test('http://127.0.0.1:8000/foo.html'), 'http/tests/foo.html')
+ self.assertEqual(driver.uri_to_test('https://127.0.0.1:8443/ssl/bar.html'), 'http/tests/ssl/bar.html')
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/dryrun.py b/Tools/Scripts/webkitpy/layout_tests/port/dryrun.py
index aaafb094c..a48d07461 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/dryrun.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/dryrun.py
@@ -33,7 +33,7 @@
This implementation acts as a wrapper around a real port (the real port
is held as a delegate object). To specify which port, use the port name
- 'dryrun-XXX' (e.g., 'dryrun-chromium-cg-mac-leopard'). If you use just
+ 'dryrun-XXX' (e.g., 'dryrun-chromium-mac-leopard'). If you use just
'dryrun', it uses the default port.
Note that because this is really acting as a wrapper around the underlying
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/factory.py b/Tools/Scripts/webkitpy/layout_tests/port/factory.py
index f87a447b0..8d61a9457 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/factory.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/factory.py
@@ -65,8 +65,7 @@ class PortFactory(object):
return 'chromium-linux'
if platform == 'darwin':
if options and hasattr(options, 'chromium') and options.chromium:
- return 'chromium-cg-mac'
- # FIXME: Add a way to select the chromium-mac port.
+ return 'chromium-mac'
return 'mac'
raise NotImplementedError('unknown port; platform = "%s"' % platform)
@@ -102,10 +101,6 @@ class PortFactory(object):
import chromium_gpu
port_name = port_to_use
maker = chromium_gpu.ChromiumGpuLinuxPort
- elif port_to_use.startswith('chromium-gpu-cg-mac'):
- import chromium_gpu
- port_name = port_to_use
- maker = chromium_gpu.ChromiumGpuCgMacPort
elif port_to_use.startswith('chromium-gpu-mac'):
import chromium_gpu
port_name = port_to_use
@@ -114,7 +109,7 @@ class PortFactory(object):
import chromium_gpu
port_name = port_to_use
maker = chromium_gpu.ChromiumGpuWinPort
- elif port_to_use.startswith('chromium-mac') or port_to_use.startswith('chromium-cg-mac'):
+ elif port_to_use.startswith('chromium-mac'):
import chromium_mac
port_name = port_to_use
maker = chromium_mac.ChromiumMacPort
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py
index 16874e0c6..be05022e5 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py
@@ -126,7 +126,6 @@ class FactoryTest(unittest.TestCase):
self.assert_port("chromium-gpu-linux", chromium_gpu.ChromiumGpuLinuxPort)
def test_chromium_gpu_mac(self):
- self.assert_port("chromium-gpu-cg-mac", chromium_gpu.ChromiumGpuCgMacPort)
self.assert_port("chromium-gpu-mac", chromium_gpu.ChromiumGpuMacPort)
def test_chromium_gpu_win(self):
@@ -134,7 +133,6 @@ class FactoryTest(unittest.TestCase):
def test_chromium_mac(self):
self.assert_port("chromium-mac", chromium_mac.ChromiumMacPort)
- self.assert_port("chromium-cg-mac", chromium_mac.ChromiumMacPort)
self.assert_platform_port("darwin", self.chromium_options,
chromium_mac.ChromiumMacPort)
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/google_chrome_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/google_chrome_unittest.py
index b2013e2a7..aea243f7f 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/google_chrome_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/google_chrome_unittest.py
@@ -52,7 +52,7 @@ class GetGoogleChromePortTest(unittest.TestCase):
# FIXME: What is the Tree() abstraction?
host = MockHost()
- chromium_port = host.port_factory.get("chromium-cg-mac")
+ chromium_port = host.port_factory.get("chromium-mac")
chromium_base = chromium_port.path_from_chromium_base()
port = host.port_factory.get(port_name=port_name, options=None)
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/gtk.py b/Tools/Scripts/webkitpy/layout_tests/port/gtk.py
index d05dda985..3f56304f1 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/gtk.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/gtk.py
@@ -94,6 +94,11 @@ class GtkPort(WebKitPort):
environment['TEST_RUNNER_TEST_PLUGIN_PATH'] = self._build_path('TestNetscapePlugin', '.libs')
environment['WEBKIT_INSPECTOR_PATH'] = self._build_path('Programs', 'resources', 'inspector')
environment['WEBKIT_TOP_LEVEL'] = self._config.webkit_base_dir()
+ if self.get_option('webkit_test_runner'):
+ # FIXME: This is a workaround to ensure that testing with WebKitTestRunner is started with
+ # a non-existing cache. This should be removed when (and if) it will be possible to properly
+ # set the cache directory path through a WebKitWebContext.
+ environment['XDG_CACHE_HOME'] = self._filesystem.join(self.results_directory(), 'appcache')
return environment
def _generate_all_test_configurations(self):
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/mac.py b/Tools/Scripts/webkitpy/layout_tests/port/mac.py
index 93855b875..461c257f2 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/mac.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/mac.py
@@ -36,7 +36,7 @@ from webkitpy.layout_tests.port.leakdetector import LeakDetector
_log = logging.getLogger(__name__)
-
+# FIXME: Delete this when we switch to using host.platforminfo.os_version instead.
def os_version(os_version_string=None, supported_versions=None):
if not os_version_string:
if hasattr(platform, 'mac_ver') and platform.mac_ver()[0]:
@@ -64,6 +64,7 @@ class MacPort(ApplePort):
# and the order of fallback between them. Matches ORWT.
VERSION_FALLBACK_ORDER = ["mac-leopard", "mac-snowleopard", "mac-lion", "mac"]
+ # FIXME: Delete this when we switch to using host.platforminfo.os_version instead.
def _detect_version(self, os_version_string):
# FIXME: MacPort and WinPort implement _detect_version differently.
# WinPort uses os_version_string as a replacement for self.version.
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/mock_drt.py b/Tools/Scripts/webkitpy/layout_tests/port/mock_drt.py
index e45fb9234..d5359dec7 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/mock_drt.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/mock_drt.py
@@ -186,6 +186,7 @@ class MockDRT(object):
if options.platform:
port_name = options.platform
self._port = PortFactory(host).get(port_name=port_name, options=options)
+ self._driver = self._port.create_driver(0)
def run(self):
while True:
@@ -200,8 +201,8 @@ class MockDRT(object):
def run_one_test(self, test_input):
port = self._port
- if test_input.uri.startswith('http'):
- test_name = port.uri_to_test_name(test_input.uri)
+ if test_input.uri.startswith('http://') or test_input.uri.startswith('https://'):
+ test_name = self._driver.uri_to_test(test_input.uri)
else:
test_name = port.relative_test_filename(test_input.uri)
@@ -256,7 +257,7 @@ class MockChromiumDRT(MockDRT):
def run_one_test(self, test_input):
port = self._port
- test_name = self._port.uri_to_test_name(test_input.uri)
+ test_name = self._driver.uri_to_test(test_input.uri)
actual_text = port.expected_text(test_name)
actual_image = ''
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py
index f81295840..cfcdf276c 100755
--- a/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py
@@ -89,13 +89,12 @@ class MockDRTPortTest(port_testcase.PortTestCase):
class MockDRTTest(unittest.TestCase):
def input_line(self, port, test_name, checksum=None):
- url = port.test_to_uri(test_name)
- # FIXME: we shouldn't have to work around platform-specific issues
- # here.
- if url.startswith('file:////'):
- url = url[len('file:////') - 1:]
- if url.startswith('file:///'):
- url = url[len('file:///') - 1:]
+ url = port.create_driver(0).test_to_uri(test_name)
+ if url.startswith('file://'):
+ if sys.platform == 'win32':
+ url = url[len('file:///'):]
+ else:
+ url = url[len('file://'):]
if checksum:
return url + "'" + checksum + '\n'
@@ -215,13 +214,13 @@ class MockChromiumDRTTest(MockDRTTest):
return mock_drt.MockChromiumDRT(options, args, host, stdin, stdout, stderr)
def input_line(self, port, test_name, checksum=None):
- url = port.test_to_uri(test_name)
+ url = port.create_driver(0).test_to_uri(test_name)
if checksum:
return url + ' 6000 ' + checksum + '\n'
return url + ' 6000\n'
def expected_output(self, port, test_name, pixel_tests, text_output, expected_checksum):
- url = port.test_to_uri(test_name)
+ url = port.create_driver(0).test_to_uri(test_name)
if pixel_tests and expected_checksum:
return ['#URL:%s\n' % url,
'#MD5:%s\n' % expected_checksum,
@@ -236,9 +235,10 @@ class MockChromiumDRTTest(MockDRTTest):
def test_pixeltest__fails(self):
host = MockHost()
+ url = '#URL:file://%s/failures/expected/checksum.html' % host.port_factory.get('test').layout_tests_dir()
self.assertTest('failures/expected/checksum.html', pixel_tests=True,
expected_checksum='wrong-checksum',
- drt_output=['#URL:file:///test.checkout/LayoutTests/failures/expected/checksum.html\n',
+ drt_output=[url + '\n',
'#MD5:checksum-checksum\n',
'checksum-txt',
'\n',
@@ -248,7 +248,7 @@ class MockChromiumDRTTest(MockDRTTest):
{'/tmp/png_result0.png': 'checksum\x8a-pngtEXtchecksum\x00checksum-checksum'})
def test_chromium_parse_options(self):
- options, args = mock_drt.parse_options(['--platform', 'chromium-cg-mac',
+ options, args = mock_drt.parse_options(['--platform', 'chromium-mac',
'--pixel-tests=/tmp/png_result0.png'])
self.assertTrue(options.chromium)
self.assertTrue(options.pixel_tests)
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/test.py b/Tools/Scripts/webkitpy/layout_tests/port/test.py
index 7b47ccede..0d51cf901 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/test.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/test.py
@@ -31,6 +31,7 @@
from __future__ import with_statement
import base64
+import sys
import time
from webkitpy.layout_tests.port import Port, Driver, DriverOutput
@@ -220,7 +221,10 @@ layer at (0,0) size 800x34
# this works. The path contains a '.' in the name because we've seen bugs
# related to this before.
-LAYOUT_TEST_DIR = '/test.checkout/LayoutTests'
+if sys.platform == 'win32':
+ LAYOUT_TEST_DIR = 'c:/test.checkout/LayoutTests'
+else:
+ LAYOUT_TEST_DIR = '/test.checkout/LayoutTests'
# Here we synthesize an in-memory filesystem from the test list
@@ -450,67 +454,6 @@ class TestPort(Port):
def all_baseline_variants(self):
return self.ALL_BASELINE_VARIANTS
- # FIXME: These next two routines are copied from base.py with
- # the calls to path.abspath_to_uri() removed. We shouldn't have
- # to do this.
- def test_to_uri(self, test_name):
- """Convert a test file (which is an absolute path) to a URI."""
- LAYOUTTEST_HTTP_DIR = "http/tests/"
- LAYOUTTEST_WEBSOCKET_DIR = "http/tests/websocket/tests/"
-
- port = None
- use_ssl = False
-
- relative_path = test_name
- if (relative_path.startswith(LAYOUTTEST_WEBSOCKET_DIR)
- or relative_path.startswith(LAYOUTTEST_HTTP_DIR)):
- relative_path = relative_path[len(LAYOUTTEST_HTTP_DIR):]
- port = 8000
-
- # Make http/tests/local run as local files. This is to mimic the
- # logic in run-webkit-tests.
- #
- # TODO(dpranke): remove the media reference and the SSL reference?
- if (port and not relative_path.startswith("local/") and
- not relative_path.startswith("media/")):
- if relative_path.startswith("ssl/"):
- port += 443
- protocol = "https"
- else:
- protocol = "http"
- return "%s://127.0.0.1:%u/%s" % (protocol, port, relative_path)
-
- return "file://" + self.abspath_for_test(test_name)
-
- def abspath_for_test(self, test_name):
- return self.layout_tests_dir() + self.TEST_PATH_SEPARATOR + test_name
-
- def uri_to_test_name(self, uri):
- """Return the base layout test name for a given URI.
-
- This returns the test name for a given URI, e.g., if you passed in
- "file:///src/LayoutTests/fast/html/keygen.html" it would return
- "fast/html/keygen.html".
-
- """
- test = uri
- if uri.startswith("file:///"):
- prefix = "file://" + self.layout_tests_dir() + "/"
- return test[len(prefix):]
-
- if uri.startswith("http://127.0.0.1:8880/"):
- # websocket tests
- return test.replace('http://127.0.0.1:8880/', '')
-
- if uri.startswith("http://"):
- # regular HTTP test
- return test.replace('http://127.0.0.1:8000/', 'http/tests/')
-
- if uri.startswith("https://"):
- return test.replace('https://127.0.0.1:8443/', 'http/tests/')
-
- raise NotImplementedError('unknown url type: %s' % uri)
-
class TestDriver(Driver):
"""Test/Dummy implementation of the DumpRenderTree interface."""
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/webkit.py b/Tools/Scripts/webkitpy/layout_tests/port/webkit.py
index 611ec0f01..cdd6af2d6 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/webkit.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/webkit.py
@@ -43,6 +43,7 @@ from webkitpy.common.memoized import memoized
from webkitpy.common.net.buildbot import BuildBot
from webkitpy.common.system.environment import Environment
from webkitpy.common.system.executive import Executive, ScriptError
+from webkitpy.common.system.path import cygpath
from webkitpy.layout_tests.port import builders, server_process, Port, Driver, DriverOutput
@@ -521,8 +522,12 @@ class WebKitDriver(Driver):
return self._crashed_subprocess_name or self._server_process.process_name()
def _command_from_driver_input(self, driver_input):
- uri = self._port.test_to_uri(driver_input.test_name)
- command = uri[7:] if uri.startswith("file:///") else uri
+ if self.is_http_test(driver_input.test_name):
+ command = self.test_to_uri(driver_input.test_name)
+ else:
+ command = self._port.abspath_for_test(driver_input.test_name)
+ if sys.platform == 'cygwin':
+ command = cygpath(command)
if driver_input.image_hash:
# FIXME: Why the leading quote?
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/win.py b/Tools/Scripts/webkitpy/layout_tests/port/win.py
index ed75a79de..2270ddef3 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/win.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/win.py
@@ -45,6 +45,7 @@ class WinPort(ApplePort):
# and the order of fallback between them. Matches ORWT.
VERSION_FALLBACK_ORDER = ["win-xp", "win-vista", "win-7sp0", "win"]
+ # FIXME: Use host.platforminfo.os_version instead.
def _version_string_from_windows_version_tuple(self, windows_version_tuple):
if windows_version_tuple[:3] == (6, 1, 7600):
return '7sp0'
diff --git a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
index 6e9153a42..9b4855748 100755
--- a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
+++ b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
@@ -172,6 +172,7 @@ def parse_args(args=None):
optparse.make_option("--platform", help="Override port/platform being tested (i.e. chromium-mac)"),
optparse.make_option('--qt', action='store_const', const='qt', dest="platform", help='Alias for --platform=qt'),
optparse.make_option('--gtk', action='store_const', const='gtk', dest="platform", help='Alias for --platform=gtk'),
+ optparse.make_option('--efl', action='store_const', const='efl', dest="platform", help='Alias for --platform=efl'),
]
print_options = printing.print_options()
@@ -264,12 +265,12 @@ def parse_args(args=None):
optparse.make_option("--build-directory",
help="Path to the directory under which build files are kept (should not include configuration)"),
optparse.make_option("--new-baseline", action="store_true",
- default=False, help="Save all generated results as new baselines "
- "into the platform directory, overwriting whatever's "
+ default=False, help="Save generated results as new baselines "
+ "into the *platform* directory, overwriting whatever's "
"already there."),
optparse.make_option("--reset-results", action="store_true",
- default=False, help="Reset any existing baselines to the "
- "generated results"),
+ default=False, help="Reset expectations to the "
+ "generated results in their existing location."),
optparse.make_option("--no-new-test-results", action="store_false",
dest="new_test_results", default=True,
help="Don't create new baselines when no expected results exist"),
diff --git a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
index acc1d167a..0ff5f2052 100755
--- a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
@@ -70,7 +70,6 @@ from webkitpy.layout_tests import port
from webkitpy.layout_tests import run_webkit_tests
from webkitpy.layout_tests.port import Port
from webkitpy.layout_tests.port.test import TestPort, TestDriver
-from webkitpy.python24.versioning import compare_version
from webkitpy.test.skip import skip_if
@@ -760,7 +759,7 @@ class MainTest(unittest.TestCase):
self.assertTrue(MainTest.has_test_of_type(batch_tests_run_http, 'http'))
self.assertTrue(MainTest.has_test_of_type(batch_tests_run_http, 'websocket'))
-MainTest = skip_if(MainTest, sys.platform == 'cygwin' and compare_version(sys, '2.6')[0] < 0, 'new-run-webkit-tests tests hang on Cygwin Python 2.5.2')
+MainTest = skip_if(MainTest, sys.platform == 'cygwin' and sys.version < '2.6', 'new-run-webkit-tests tests hang on Cygwin Python 2.5.2')
class EndToEndTest(unittest.TestCase):
diff --git a/Tools/Scripts/webkitpy/python24/__init__.py b/Tools/Scripts/webkitpy/python24/__init__.py
deleted file mode 100644
index ef65bee5b..000000000
--- a/Tools/Scripts/webkitpy/python24/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-# Required for Python to search this directory for module files
diff --git a/Tools/Scripts/webkitpy/python24/versioning.py b/Tools/Scripts/webkitpy/python24/versioning.py
deleted file mode 100644
index b239217df..000000000
--- a/Tools/Scripts/webkitpy/python24/versioning.py
+++ /dev/null
@@ -1,135 +0,0 @@
-# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. 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.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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.
-
-"""Supports Python version checking."""
-
-import logging
-import sys
-
-
-_log = logging.getLogger(__name__)
-
-
-# The minimum Python version the webkitpy package supports.
-_MINIMUM_SUPPORTED_PYTHON_VERSION = "2.5"
-
-
-def compare_version(sysmodule=None, target_version=None):
- """Compare the current Python version with a target version.
-
- Args:
- sysmodule: An object with version and version_info data attributes
- used to detect the current Python version. The attributes
- should have the same semantics as sys.version and
- sys.version_info. This parameter should only be used
- for unit testing. Defaults to sys.
- target_version: A string representing the Python version to compare
- the current version against. The string should have
- one of the following three forms: 2, 2.5, or 2.5.3.
- Defaults to the minimum version that the webkitpy
- package supports.
-
- Returns:
- A triple of (comparison, current_version, target_version).
-
- comparison: An integer representing the result of comparing the
- current version with the target version. A positive
- number means the current version is greater than the
- target, 0 means they are the same, and a negative number
- means the current version is less than the target.
- This method compares version information only up
- to the precision of the given target version. For
- example, if the target version is 2.6 and the current
- version is 2.5.3, this method uses 2.5 for the purposes
- of comparing with the target.
- current_version: A string representing the current Python version, for
- example 2.5.3.
- target_version: A string representing the version that the current
- version was compared against, for example 2.5.
-
- """
- if sysmodule is None:
- sysmodule = sys
- if target_version is None:
- target_version = _MINIMUM_SUPPORTED_PYTHON_VERSION
-
- # The number of version parts to compare.
- precision = len(target_version.split("."))
-
- # We use sys.version_info rather than sys.version since its first
- # three elements are guaranteed to be integers.
- current_version_info_to_compare = sysmodule.version_info[:precision]
- # Convert integers to strings.
- current_version_info_to_compare = map(str, current_version_info_to_compare)
- current_version_to_compare = ".".join(current_version_info_to_compare)
-
- # Compare version strings lexicographically.
- if current_version_to_compare > target_version:
- comparison = 1
- elif current_version_to_compare == target_version:
- comparison = 0
- else:
- comparison = -1
-
- # The version number portion of the current version string, for
- # example "2.6.4".
- current_version = sysmodule.version.split()[0]
-
- return (comparison, current_version, target_version)
-
-
-# FIXME: Add a logging level parameter to allow the version message
-# to be logged at levels other than WARNING, for example CRITICAL.
-def check_version(log=None, sysmodule=None, target_version=None):
- """Check the current Python version against a target version.
-
- Logs a warning message if the current version is less than the
- target version.
-
- Args:
- log: A logging.logger instance to use when logging the version warning.
- Defaults to the logger of this module.
- sysmodule: See the compare_version() docstring.
- target_version: See the compare_version() docstring.
-
- Returns:
- A boolean value of whether the current version is greater than
- or equal to the target version.
-
- """
- if log is None:
- log = _log
-
- (comparison, current_version, target_version) = \
- compare_version(sysmodule, target_version)
-
- if comparison >= 0:
- # Then the current version is at least the minimum version.
- return True
-
- message = ("WebKit Python scripts do not support your current Python "
- "version (%s). The minimum supported version is %s.\n"
- " See the following page to upgrade your Python version:\n\n"
- " http://trac.webkit.org/wiki/PythonGuidelines\n"
- % (current_version, target_version))
- log.warn(message)
- return False
diff --git a/Tools/Scripts/webkitpy/python24/versioning_unittest.py b/Tools/Scripts/webkitpy/python24/versioning_unittest.py
deleted file mode 100644
index 6939e2d92..000000000
--- a/Tools/Scripts/webkitpy/python24/versioning_unittest.py
+++ /dev/null
@@ -1,134 +0,0 @@
-# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. 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.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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.
-
-"""Contains unit tests for versioning.py."""
-
-import logging
-import unittest
-
-from webkitpy.common.system.logtesting import LogTesting
-from webkitpy.python24.versioning import check_version
-from webkitpy.python24.versioning import compare_version
-
-class MockSys(object):
-
- """A mock sys module for passing to version-checking methods."""
-
- def __init__(self, current_version):
- """Create an instance.
-
- current_version: A version string with major, minor, and micro
- version parts.
-
- """
- version_info = current_version.split(".")
- version_info = map(int, version_info)
-
- self.version = current_version + " Version details."
- self.version_info = version_info
-
-
-class CompareVersionTest(unittest.TestCase):
-
- """Tests compare_version()."""
-
- def _mock_sys(self, current_version):
- return MockSys(current_version)
-
- def test_default_minimum_version(self):
- """Test the configured minimum version that webkitpy supports."""
- (comparison, current_version, min_version) = compare_version()
- self.assertEquals(min_version, "2.5")
-
- def compare_version(self, target_version, current_version=None):
- """Call compare_version()."""
- if current_version is None:
- current_version = "2.5.3"
- mock_sys = self._mock_sys(current_version)
- return compare_version(mock_sys, target_version)
-
- def compare(self, target_version, current_version=None):
- """Call compare_version(), and return the comparison."""
- return self.compare_version(target_version, current_version)[0]
-
- def test_returned_current_version(self):
- """Test the current_version return value."""
- current_version = self.compare_version("2.5")[1]
- self.assertEquals(current_version, "2.5.3")
-
- def test_returned_target_version(self):
- """Test the current_version return value."""
- target_version = self.compare_version("2.5")[2]
- self.assertEquals(target_version, "2.5")
-
- def test_target_version_major(self):
- """Test major version for target."""
- self.assertEquals(-1, self.compare("3"))
- self.assertEquals(0, self.compare("2"))
- self.assertEquals(1, self.compare("2", "3.0.0"))
-
- def test_target_version_minor(self):
- """Test minor version for target."""
- self.assertEquals(-1, self.compare("2.6"))
- self.assertEquals(0, self.compare("2.5"))
- self.assertEquals(1, self.compare("2.4"))
-
- def test_target_version_micro(self):
- """Test minor version for target."""
- self.assertEquals(-1, self.compare("2.5.4"))
- self.assertEquals(0, self.compare("2.5.3"))
- self.assertEquals(1, self.compare("2.5.2"))
-
-
-class CheckVersionTest(unittest.TestCase):
-
- """Tests check_version()."""
-
- def setUp(self):
- self._log = LogTesting.setUp(self)
-
- def tearDown(self):
- self._log.tearDown()
-
- def _check_version(self, minimum_version):
- """Call check_version()."""
- mock_sys = MockSys("2.5.3")
- return check_version(sysmodule=mock_sys, target_version=minimum_version)
-
- def test_true_return_value(self):
- """Test the configured minimum version that webkitpy supports."""
- is_current = self._check_version("2.4")
- self.assertEquals(True, is_current)
- self._log.assertMessages([]) # No warning was logged.
-
- def test_false_return_value(self):
- """Test the configured minimum version that webkitpy supports."""
- is_current = self._check_version("2.6")
- self.assertEquals(False, is_current)
- expected_message = ('WARNING: WebKit Python scripts do not support '
- 'your current Python version (2.5.3). '
- 'The minimum supported version is 2.6.\n '
- 'See the following page to upgrade your Python '
- 'version:\n\n '
- 'http://trac.webkit.org/wiki/PythonGuidelines\n\n')
- self._log.assertMessages([expected_message])
-
diff --git a/Tools/Scripts/webkitpy/to_be_moved/rebaseline_chromium_webkit_tests.py b/Tools/Scripts/webkitpy/to_be_moved/rebaseline_chromium_webkit_tests.py
index b6b6e64b7..9e886d5a5 100644
--- a/Tools/Scripts/webkitpy/to_be_moved/rebaseline_chromium_webkit_tests.py
+++ b/Tools/Scripts/webkitpy/to_be_moved/rebaseline_chromium_webkit_tests.py
@@ -72,8 +72,6 @@ ARCHIVE_DIR_NAME_DICT = {
'chromium-win-xp': 'Webkit_Win',
'chromium-mac-leopard': 'Webkit_Mac10_5',
'chromium-mac-snowleopard': 'Webkit_Mac10_6',
- 'chromium-cg-mac-leopard': 'Webkit_Mac10_5__CG_',
- 'chromium-cg-mac-snowleopard': 'Webkit_Mac10_6__CG_',
'chromium-linux-x86': 'Webkit_Linux_32',
'chromium-linux-x86_64': 'Webkit_Linux',
'chromium-gpu-mac-snowleopard': 'Webkit_Mac10_6_-_GPU',
diff --git a/Tools/Scripts/webkitpy/to_be_moved/rebaseline_chromium_webkit_tests_unittest.py b/Tools/Scripts/webkitpy/to_be_moved/rebaseline_chromium_webkit_tests_unittest.py
index 59299e396..c44dcdf2f 100644
--- a/Tools/Scripts/webkitpy/to_be_moved/rebaseline_chromium_webkit_tests_unittest.py
+++ b/Tools/Scripts/webkitpy/to_be_moved/rebaseline_chromium_webkit_tests_unittest.py
@@ -85,8 +85,6 @@ def test_url_fetcher(filesystem):
urls = {
ARCHIVE_URL + '/Webkit_Mac10_6/': '<a href="4/">',
ARCHIVE_URL + '/Webkit_Mac10_5/': '<a href="1/"><a href="2/">',
- ARCHIVE_URL + '/Webkit_Mac10_6__CG_/': '<a href="4/">',
- ARCHIVE_URL + '/Webkit_Mac10_5__CG_/': '<a href="1/"><a href="2/">',
ARCHIVE_URL + '/Webkit_Win7/': '<a href="1/">',
ARCHIVE_URL + '/Webkit_Vista/': '<a href="1/">',
ARCHIVE_URL + '/Webkit_Win/': '<a href="1/">',
@@ -110,19 +108,6 @@ def test_zip_factory():
'layout-test-results/failures/expected/image-actual.checksum': 'new-image-checksum',
'layout-test-results/failures/expected/image-actual.png': 'new-image-png',
},
- ARCHIVE_URL + '/Webkit_Mac10_5__CG_/2/layout-test-results.zip': {
- 'layout-test-results/failures/expected/image-actual.txt': 'new-image-txt',
- 'layout-test-results/failures/expected/image-actual.checksum': 'new-image-checksum',
- 'layout-test-results/failures/expected/image-actual.png': 'new-image-png',
- 'layout-test-results/failures/expected/image_checksum-actual.txt': 'png-comment-txt',
- 'layout-test-results/failures/expected/image_checksum-actual.checksum': '0123456789',
- 'layout-test-results/failures/expected/image_checksum-actual.png': 'tEXtchecksum\x000123456789',
- },
- ARCHIVE_URL + '/Webkit_Mac10_6__CG_/4/layout-test-results.zip': {
- 'layout-test-results/failures/expected/image-actual.txt': 'new-image-txt',
- 'layout-test-results/failures/expected/image-actual.checksum': 'new-image-checksum',
- 'layout-test-results/failures/expected/image-actual.png': 'new-image-png',
- },
ARCHIVE_URL + '/Webkit_Vista/1/layout-test-results.zip': {
'layout-test-results/failures/expected/image-actual.txt': 'win-image-txt',
'layout-test-results/failures/expected/image-actual.checksum': 'win-image-checksum',
@@ -152,7 +137,6 @@ def test_archive(orig_archive_dict):
for platform, dirname in orig_archive_dict.iteritems():
# This is a giant hack. :(
platform = platform.replace('chromium', 'test')
- platform = platform.replace('test-cg', 'test')
new_archive_dict[platform] = dirname
return new_archive_dict
@@ -211,7 +195,7 @@ class TestRebaseliner(unittest.TestCase):
zip_factory = test_zip_factory()
# FIXME: SCM module doesn't handle paths that aren't relative to the checkout_root consistently.
- filesystem.chdir("/test.checkout")
+ filesystem.chdir(filesystem.dirname(host_port_obj.layout_tests_dir()))
rebaseliner = rebaseline_chromium_webkit_tests.Rebaseliner(host, host_port_obj,
target_port_obj, platform, options, url_fetcher, zip_factory)
@@ -243,34 +227,37 @@ class TestRebaseliner(unittest.TestCase):
"BUGX REBASELINE MAC : failures/expected/image.html = IMAGE")
rebaseliner.run()
+ layout_test_dir = rebaseliner._port.layout_tests_dir()
# We expect to have written 13 files over the course of this rebaseline:
# *) 3 files in /__im_tmp for the extracted archive members
- # *) 3 new baselines under '/test.checkout/LayoutTests'
+ # *) 3 new baselines under layout_test_dir
# *) 4 files in /tmp for the new and old baselines in the result file
# (-{old,new}.{txt,png}
# *) 1 text diff in /tmp for the result file (-diff.txt).
# *) 1 image diff in /tmp for the result file (-diff.png).
# *) 1 updated test_expectations file
self.assertEqual(len(filesystem.written_files), 13)
- self.assertEqual(filesystem.files['/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image-expected.checksum'], 'new-image-checksum')
- self.assertEqual(filesystem.files['/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image-expected.png'], 'new-image-png')
- self.assertEqual(filesystem.files['/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image-expected.txt'], 'new-image-txt')
+ self.assertEqual(filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image-expected.checksum'], 'new-image-checksum')
+ self.assertEqual(filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image-expected.png'], 'new-image-png')
+ self.assertEqual(filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image-expected.txt'], 'new-image-txt')
def test_all_platforms(self):
rebaseliner, filesystem = self.make_rebaseliner(
"BUGX REBASELINE : failures/expected/image.html = IMAGE")
+ layout_test_dir = rebaseliner._port.layout_tests_dir()
rebaseliner.run()
# See comment in test_one_platform for an explanation of the 13 written tests.
# Note that even though the rebaseline is marked for all platforms, each
# rebaseliner only ever does one.
self.assertEqual(len(filesystem.written_files), 13)
- self.assertEqual(filesystem.files['/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image-expected.checksum'], 'new-image-checksum')
- self.assertEqual(filesystem.files['/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image-expected.png'], 'new-image-png')
- self.assertEqual(filesystem.files['/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image-expected.txt'], 'new-image-txt')
+ self.assertEqual(filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image-expected.checksum'], 'new-image-checksum')
+ self.assertEqual(filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image-expected.png'], 'new-image-png')
+ self.assertEqual(filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image-expected.txt'], 'new-image-txt')
def test_png_file_with_comment(self):
rebaseliner, filesystem = self.make_rebaseliner(
"BUGX REBASELINE MAC : failures/expected/image_checksum.html = IMAGE")
+ layout_test_dir = rebaseliner._port.layout_tests_dir()
compile_success = rebaseliner._compile_rebaselining_tests()
self.assertTrue(compile_success)
self.assertEqual(set(['failures/expected/image_checksum.html']), rebaseliner._rebaselining_tests)
@@ -278,16 +265,17 @@ class TestRebaseliner(unittest.TestCase):
# There is one less file written than |test_one_platform| because we only
# write 2 expectations (the png and the txt file).
self.assertEqual(len(filesystem.written_files), 12)
- self.assertEqual(filesystem.files['/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.png'], 'tEXtchecksum\x000123456789')
- self.assertEqual(filesystem.files['/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.txt'], 'png-comment-txt')
- self.assertFalse(filesystem.files.get('/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.checksum', None))
+ self.assertEqual(filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.png'], 'tEXtchecksum\x000123456789')
+ self.assertEqual(filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.txt'], 'png-comment-txt')
+ self.assertFalse(filesystem.files.get(layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.checksum', None))
def test_png_file_with_comment_remove_old_checksum(self):
rebaseliner, filesystem = self.make_rebaseliner(
"BUGX REBASELINE MAC : failures/expected/image_checksum.html = IMAGE")
- filesystem.files['/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.png'] = 'old'
- filesystem.files['/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.checksum'] = 'old'
- filesystem.files['/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.txt'] = 'old'
+ layout_test_dir = rebaseliner._port.layout_tests_dir()
+ filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.png'] = 'old'
+ filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.checksum'] = 'old'
+ filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.txt'] = 'old'
compile_success = rebaseliner._compile_rebaselining_tests()
self.assertTrue(compile_success)
@@ -296,23 +284,24 @@ class TestRebaseliner(unittest.TestCase):
# There is one more file written than |test_png_file_with_comment_remove_old_checksum|
# because we also delete the old checksum.
self.assertEqual(len(filesystem.written_files), 13)
- self.assertEqual(filesystem.files['/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.png'], 'tEXtchecksum\x000123456789')
- self.assertEqual(filesystem.files['/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.txt'], 'png-comment-txt')
- self.assertEqual(filesystem.files.get('/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.checksum', None), None)
+ self.assertEqual(filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.png'], 'tEXtchecksum\x000123456789')
+ self.assertEqual(filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.txt'], 'png-comment-txt')
+ self.assertEqual(filesystem.files.get(layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.checksum', None), None)
def test_png_file_with_comment_as_duplicate(self):
rebaseliner, filesystem = self.make_rebaseliner(
"BUGX REBASELINE MAC : failures/expected/image_checksum.html = IMAGE")
- filesystem.files['/test.checkout/LayoutTests/platform/test-mac-snowleopard/failures/expected/image_checksum-expected.png'] = 'tEXtchecksum\x000123456789'
- filesystem.files['/test.checkout/LayoutTests/platform/test-mac-snowleopard/failures/expected/image_checksum-expected.txt'] = 'png-comment-txt'
+ layout_test_dir = rebaseliner._port.layout_tests_dir()
+ filesystem.files[layout_test_dir + '/platform/test-mac-snowleopard/failures/expected/image_checksum-expected.png'] = 'tEXtchecksum\x000123456789'
+ filesystem.files[layout_test_dir + '/platform/test-mac-snowleopard/failures/expected/image_checksum-expected.txt'] = 'png-comment-txt'
compile_success = rebaseliner._compile_rebaselining_tests()
self.assertTrue(compile_success)
self.assertEqual(set(['failures/expected/image_checksum.html']), rebaseliner._rebaselining_tests)
rebaseliner.run()
- self.assertEqual(filesystem.files.get('/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.png', None), None)
- self.assertEqual(filesystem.files.get('/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.txt', None), None)
- self.assertEqual(filesystem.files.get('/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.checksum', None), None)
+ self.assertEqual(filesystem.files.get(layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.png', None), None)
+ self.assertEqual(filesystem.files.get(layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.txt', None), None)
+ self.assertEqual(filesystem.files.get(layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.checksum', None), None)
def test_diff_baselines_txt(self):
rebaseliner, filesystem = self.make_rebaseliner("")
@@ -347,7 +336,7 @@ class TestRealMain(unittest.TestCase):
zip_factory = test_zip_factory()
# FIXME: SCM module doesn't handle paths that aren't relative to the checkout_root consistently.
- filesystem.chdir("/test.checkout")
+ filesystem.chdir(filesystem.dirname(host_port_obj.layout_tests_dir()))
oc = outputcapture.OutputCapture()
oc.capture_output()
diff --git a/Tools/Scripts/webkitpy/tool/commands/download_unittest.py b/Tools/Scripts/webkitpy/tool/commands/download_unittest.py
index 8b63dfcb6..d5a6faf02 100644
--- a/Tools/Scripts/webkitpy/tool/commands/download_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/download_unittest.py
@@ -90,7 +90,7 @@ class DownloadCommandsTest(CommandsTest):
self.assert_execute_outputs(Build(), [], options=self._default_options(), expected_stderr=expected_stderr)
def test_build_and_test(self):
- expected_stderr = "Updating working directory\nBuilding WebKit\nRunning Python unit tests\nRunning Perl unit tests\nRunning JavaScriptCore tests\nRunning run-webkit-tests\n"
+ expected_stderr = "Updating working directory\nBuilding WebKit\nRunning Python unit tests\nRunning Perl unit tests\nRunning JavaScriptCore tests\nRunning WebKit unit tests\nRunning run-webkit-tests\n"
self.assert_execute_outputs(BuildAndTest(), [], options=self._default_options(), expected_stderr=expected_stderr)
def test_apply_attachment(self):
@@ -116,7 +116,7 @@ MockWatchList: determine_cc_and_messages
self.assert_execute_outputs(ApplyWatchList(), [10000], options=self._default_options(), expected_stderr=expected_stderr, tool=MockTool(log_executive=True))
def test_land(self):
- expected_stderr = "Building WebKit\nRunning Python unit tests\nRunning Perl unit tests\nRunning JavaScriptCore tests\nRunning run-webkit-tests\nCommitted r49824: <http://trac.webkit.org/changeset/49824>\nUpdating bug 50000\n"
+ expected_stderr = "Building WebKit\nRunning Python unit tests\nRunning Perl unit tests\nRunning JavaScriptCore tests\nRunning WebKit unit tests\nRunning run-webkit-tests\nCommitted r49824: <http://trac.webkit.org/changeset/49824>\nUpdating bug 50000\n"
mock_tool = MockTool()
mock_tool.scm().create_patch = Mock(return_value="Patch1\nMockPatch\n")
mock_tool.checkout().modified_changelogs = Mock(return_value=[])
@@ -139,6 +139,8 @@ Running Perl unit tests
MOCK run_and_throw_if_fail: ['mock-test-webkitperl'], cwd=/mock-checkout
Running JavaScriptCore tests
MOCK run_and_throw_if_fail: ['mock-run-javacriptcore-tests'], cwd=/mock-checkout
+Running WebKit unit tests
+MOCK run_and_throw_if_fail: ['mock-run-webkit-unit-tests'], cwd=/mock-checkout
Running run-webkit-tests
MOCK run_and_throw_if_fail: ['mock-run-webkit-tests', '--quiet'], cwd=/mock-checkout
Committed r49824: <http://trac.webkit.org/changeset/49824>
@@ -149,7 +151,7 @@ No bug id provided.
self.assert_execute_outputs(LandCowboy(), [50000], options=self._default_options(), expected_stderr=expected_stderr, tool=mock_tool)
def test_land_red_builders(self):
- expected_stderr = 'Building WebKit\nRunning Python unit tests\nRunning Perl unit tests\nRunning JavaScriptCore tests\nRunning run-webkit-tests\nCommitted r49824: <http://trac.webkit.org/changeset/49824>\nUpdating bug 50000\n'
+ expected_stderr = 'Building WebKit\nRunning Python unit tests\nRunning Perl unit tests\nRunning JavaScriptCore tests\nRunning WebKit unit tests\nRunning run-webkit-tests\nCommitted r49824: <http://trac.webkit.org/changeset/49824>\nUpdating bug 50000\n'
mock_tool = MockTool()
mock_tool.buildbot.light_tree_on_fire()
self.assert_execute_outputs(Land(), [50000], options=self._default_options(), expected_stderr=expected_stderr, tool=mock_tool)
@@ -176,6 +178,7 @@ Building WebKit
Running Python unit tests
Running Perl unit tests
Running JavaScriptCore tests
+Running WebKit unit tests
Running run-webkit-tests
Committed r49824: <http://trac.webkit.org/changeset/49824>
Not closing bug 50000 as attachment 10000 has review=+. Assuming there are more patches to land from this bug.
@@ -192,6 +195,7 @@ Building WebKit
Running Python unit tests
Running Perl unit tests
Running JavaScriptCore tests
+Running WebKit unit tests
Running run-webkit-tests
Committed r49824: <http://trac.webkit.org/changeset/49824>
Not closing bug 50000 as attachment 10000 has review=+. Assuming there are more patches to land from this bug.
@@ -201,6 +205,7 @@ Building WebKit
Running Python unit tests
Running Perl unit tests
Running JavaScriptCore tests
+Running WebKit unit tests
Running run-webkit-tests
Committed r49824: <http://trac.webkit.org/changeset/49824>
Not closing bug 50000 as attachment 10000 has review=+. Assuming there are more patches to land from this bug.
diff --git a/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py b/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
index bcb0921aa..52724308d 100644
--- a/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
@@ -60,15 +60,7 @@ class TestRebaseline(unittest.TestCase):
# Don't enable logging until after we create the mock expectation files as some Port.__init__'s run subcommands.
tool.executive = MockExecutive(should_log=True)
- expected_stdout = """Retrieving results for chromium-cg-mac-leopard from Webkit Mac10.5 (CG).
- userscripts/another-test.html
- userscripts/images.svg
-Retrieving results for chromium-cg-mac-snowleopard from Webkit Mac10.6 (CG).
- userscripts/another-test.html
- userscripts/images.svg
-Retrieving results for chromium-gpu-cg-mac-leopard from Webkit Mac10.5 (CG) - GPU.
-Retrieving results for chromium-gpu-cg-mac-snowleopard from Webkit Mac10.6 (CG) - GPU.
-Retrieving results for chromium-gpu-mac-snowleopard from Webkit Mac10.6 - GPU.
+ expected_stdout = """Retrieving results for chromium-gpu-mac-snowleopard from Webkit Mac10.6 - GPU.
Retrieving results for chromium-gpu-win-win7 from Webkit Win7 - GPU.
Retrieving results for chromium-gpu-win-xp from Webkit Win - GPU.
Retrieving results for chromium-linux-x86 from Webkit Linux 32.
@@ -95,11 +87,7 @@ Retrieving results for chromium-win-xp from Webkit Win.
Optimizing baselines for userscripts/another-test.html.
Optimizing baselines for userscripts/images.svg.
"""
- expected_stderr = """MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Mac10.5 (CG)', 'userscripts/another-test.html'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Mac10.5 (CG)', 'userscripts/images.svg'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Mac10.6 (CG)', 'userscripts/another-test.html'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Mac10.6 (CG)', 'userscripts/images.svg'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Linux 32', 'userscripts/another-test.html'], cwd=/mock-checkout
+ expected_stderr = """MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Linux 32', 'userscripts/another-test.html'], cwd=/mock-checkout
MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Linux 32', 'userscripts/images.svg'], cwd=/mock-checkout
MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Linux', 'userscripts/another-test.html'], cwd=/mock-checkout
MOCK run_command: ['echo', 'rebaseline-test', 'Webkit Linux', 'userscripts/images.svg'], cwd=/mock-checkout
diff --git a/Tools/Scripts/webkitpy/tool/steps/runtests.py b/Tools/Scripts/webkitpy/tool/steps/runtests.py
index fa4273e8d..815be0463 100644
--- a/Tools/Scripts/webkitpy/tool/steps/runtests.py
+++ b/Tools/Scripts/webkitpy/tool/steps/runtests.py
@@ -61,6 +61,11 @@ class RunTests(AbstractStep):
log("Running JavaScriptCore tests")
self._tool.executive.run_and_throw_if_fail(javascriptcore_tests_command, quiet=True, cwd=self._tool.scm().checkout_root)
+ webkit_unit_tests_command = self._tool.port().run_webkit_unit_tests_command()
+ if webkit_unit_tests_command:
+ log("Running WebKit unit tests")
+ self._tool.executive.run_and_throw_if_fail(webkit_unit_tests_command, cwd=self._tool.scm().checkout_root)
+
log("Running run-webkit-tests")
args = self._tool.port().run_webkit_tests_command()
if self._options.non_interactive:
diff --git a/Tools/Scripts/webkitpy/tool/steps/runtests_unittest.py b/Tools/Scripts/webkitpy/tool/steps/runtests_unittest.py
index fd59315b6..880b99890 100644
--- a/Tools/Scripts/webkitpy/tool/steps/runtests_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/steps/runtests_unittest.py
@@ -39,6 +39,7 @@ class RunTestsTest(unittest.TestCase):
tool._deprecated_port.run_perl_unittests_command = lambda: None
step = RunTests(tool, MockOptions(test=True, non_interactive=True, quiet=False))
expected_stderr = """Running JavaScriptCore tests
+Running WebKit unit tests
Running run-webkit-tests
"""
OutputCapture().assert_outputs(self, step.run, [{}], expected_stderr=expected_stderr)
diff --git a/Tools/TestResultServer/static-dashboards/builders.js b/Tools/TestResultServer/static-dashboards/builders.js
index 842721d42..5ca38c7fd 100644
--- a/Tools/TestResultServer/static-dashboards/builders.js
+++ b/Tools/TestResultServer/static-dashboards/builders.js
@@ -93,7 +93,6 @@ var CHROMIUM_LAYOUT_DEPS_BUILDERS = [
['Webkit Win (deps)', BuilderGroup.DEFAULT_BUILDER],
['Webkit Linux (deps)', BuilderGroup.EXPECTATIONS_BUILDER],
['Webkit Mac10.6 (deps)'],
- ['Webkit Mac10.6 (CG)(deps)'],
];
associateBuildersWithMaster(CHROMIUM_LAYOUT_DEPS_BUILDERS, CHROMIUM_WEBKIT_BUILDER_MASTER);
@@ -111,11 +110,6 @@ var CHROMIUM_LAYOUT_TOT_BUILDERS = [
['Webkit Mac10.5 (dbg)(2)'],
['Webkit Mac10.6'],
['Webkit Mac10.6 (dbg)'],
- ['Webkit Mac10.5 (CG)'],
- ['Webkit Mac10.5 (CG)(dbg)(1)'],
- ['Webkit Mac10.5 (CG)(dbg)(2)'],
- ['Webkit Mac10.6 (CG)'],
- ['Webkit Mac10.6 (CG)(dbg)']
];
associateBuildersWithMaster(CHROMIUM_LAYOUT_TOT_BUILDERS, CHROMIUM_WEBKIT_BUILDER_MASTER);
@@ -146,11 +140,6 @@ var CHROMIUM_GPU_MESA_BUILDERS = [
['Webkit Mac10.5 (dbg)(2) - GPU'],
['Webkit Mac10.6 - GPU'],
['Webkit Mac10.6 (dbg) - GPU'],
- ['Webkit Mac10.5 (CG) - GPU'],
- ['Webkit Mac10.5 (CG)(dbg)(1) - GPU'],
- ['Webkit Mac10.5 (CG)(dbg)(2) - GPU'],
- ['Webkit Mac10.6 (CG) - GPU'],
- ['Webkit Mac10.6 (CG)(dbg) - GPU']
];
associateBuildersWithMaster(CHROMIUM_GPU_MESA_BUILDERS, CHROMIUM_WEBKIT_BUILDER_MASTER);
diff --git a/Tools/TestResultServer/static-dashboards/flakiness_dashboard.html b/Tools/TestResultServer/static-dashboards/flakiness_dashboard.html
index b9407f571..4eb05ccf6 100644
--- a/Tools/TestResultServer/static-dashboards/flakiness_dashboard.html
+++ b/Tools/TestResultServer/static-dashboards/flakiness_dashboard.html
@@ -2442,8 +2442,8 @@ g_fallbacksMap['WIN-XP'] = ['chromium-win-xp', 'chromium-win-vista', 'chromium-w
g_fallbacksMap['WIN-VISTA'] = ['chromium-win-vista', 'chromium-win', 'chromium', 'win', 'mac'];
g_fallbacksMap['WIN-7'] = ['chromium-win', 'chromium', 'win', 'mac'];
g_fallbacksMap['WIN-7-GPU'] = ['chromium-gpu-win'].concat(g_fallbacksMap['WIN-7']);
-g_fallbacksMap['MAC-LEOPARD'] = ['chromium-cg-mac-leopard', 'chromium-cg-mac-snowleopard', 'chromium-cg-mac', 'chromium', 'mac-leopard', 'mac-snowleopard', 'mac'];
-g_fallbacksMap['MAC-SNOWLEOPARD'] = ['chromium-cg-mac-snowleopard', 'chromium-cg-mac', 'chromium', 'mac-snowleopard', 'mac'];
+g_fallbacksMap['MAC-LEOPARD'] = ['chromium-mac-leopard', 'chromium-mac-snowleopard', 'chromium-mac', 'chromium', 'mac-leopard', 'mac-snowleopard', 'mac'];
+g_fallbacksMap['MAC-SNOWLEOPARD'] = ['chromium-mac-snowleopard', 'chromium-mac', 'chromium', 'mac-snowleopard', 'mac'];
g_fallbacksMap['MAC-SNOWLEOPARD-GPU'] = ['chromium-gpu-mac'].concat(g_fallbacksMap['MAC-SNOWLEOPARD']);
g_fallbacksMap['LINUX-32'] = ['chromium-linux-x86', 'chromium-linux', 'chromium-win', 'chromium', 'win', 'mac'];
g_fallbacksMap['LINUX-64'] = ['chromium-linux', 'chromium-win', 'chromium', 'win', 'mac'];
diff --git a/Tools/TestResultServer/static-dashboards/flakiness_dashboard_tests.js b/Tools/TestResultServer/static-dashboards/flakiness_dashboard_tests.js
index c61bae327..3690c479d 100644
--- a/Tools/TestResultServer/static-dashboards/flakiness_dashboard_tests.js
+++ b/Tools/TestResultServer/static-dashboards/flakiness_dashboard_tests.js
@@ -160,8 +160,8 @@ function testOverrideJustBuildType()
runExpectationsTest('Webkit Win (dbg)(3)', test, 'FAIL PASS TIMEOUT', 'WONTFIX');
runExpectationsTest('Webkit Linux', test, 'FAIL PASS TIMEOUT', 'WONTFIX');
runExpectationsTest('Webkit Linux (dbg)(3)', test, 'CRASH', 'LINUX DEBUG');
- runExpectationsTest('Webkit Mac10.5 (CG)', test, 'FAIL', 'WONTFIX MAC');
- runExpectationsTest('Webkit Mac10.5 (CG)(dbg)(3)', test, 'FAIL', 'WONTFIX MAC');
+ runExpectationsTest('Webkit Mac10.5', test, 'FAIL', 'WONTFIX MAC');
+ runExpectationsTest('Webkit Mac10.5 (dbg)(3)', test, 'FAIL', 'WONTFIX MAC');
}
function testPlatformAndBuildType()
@@ -179,9 +179,9 @@ function testPlatformAndBuildType()
runPlatformAndBuildTypeTest('Webkit Linux (deps)', 'LUCID', 'RELEASE');
runPlatformAndBuildTypeTest('Webkit Linux (deps)(dbg)(1)', 'LUCID', 'DEBUG');
runPlatformAndBuildTypeTest('Webkit Linux (deps)(dbg)(2)', 'LUCID', 'DEBUG');
- runPlatformAndBuildTypeTest('Webkit Mac10.6 (CG)(deps)', 'SNOWLEOPARD', 'RELEASE');
- runPlatformAndBuildTypeTest('Webkit Mac10.6 (CG)(deps)(dbg)(1)', 'SNOWLEOPARD', 'DEBUG');
- runPlatformAndBuildTypeTest('Webkit Mac10.6 (CG)(deps)(dbg)(2)', 'SNOWLEOPARD', 'DEBUG');
+ runPlatformAndBuildTypeTest('Webkit Mac10.6 (deps)', 'SNOWLEOPARD', 'RELEASE');
+ runPlatformAndBuildTypeTest('Webkit Mac10.6 (deps)(dbg)(1)', 'SNOWLEOPARD', 'DEBUG');
+ runPlatformAndBuildTypeTest('Webkit Mac10.6 (deps)(dbg)(2)', 'SNOWLEOPARD', 'DEBUG');
runPlatformAndBuildTypeTest('Webkit Win', 'XP', 'RELEASE');
runPlatformAndBuildTypeTest('Webkit Vista', 'VISTA', 'RELEASE');
runPlatformAndBuildTypeTest('Webkit Win7', 'WIN7', 'RELEASE');
@@ -191,11 +191,11 @@ function testPlatformAndBuildType()
runPlatformAndBuildTypeTest('Webkit Linux 32', 'LUCID', 'RELEASE');
runPlatformAndBuildTypeTest('Webkit Linux (dbg)(1)', 'LUCID', 'DEBUG');
runPlatformAndBuildTypeTest('Webkit Linux (dbg)(2)', 'LUCID', 'DEBUG');
- runPlatformAndBuildTypeTest('Webkit Mac10.5 (CG)', 'LEOPARD', 'RELEASE');
- runPlatformAndBuildTypeTest('Webkit Mac10.5 (CG)(dbg)(1)', 'LEOPARD', 'DEBUG');
- runPlatformAndBuildTypeTest('Webkit Mac10.5 (CG)(dbg)(2)', 'LEOPARD', 'DEBUG');
- runPlatformAndBuildTypeTest('Webkit Mac10.6 (CG)', 'SNOWLEOPARD', 'RELEASE');
- runPlatformAndBuildTypeTest('Webkit Mac10.6 (CG)(dbg)', 'SNOWLEOPARD', 'DEBUG');
+ runPlatformAndBuildTypeTest('Webkit Mac10.5', 'LEOPARD', 'RELEASE');
+ runPlatformAndBuildTypeTest('Webkit Mac10.5 (dbg)(1)', 'LEOPARD', 'DEBUG');
+ runPlatformAndBuildTypeTest('Webkit Mac10.5 (dbg)(2)', 'LEOPARD', 'DEBUG');
+ runPlatformAndBuildTypeTest('Webkit Mac10.6', 'SNOWLEOPARD', 'RELEASE');
+ runPlatformAndBuildTypeTest('Webkit Mac10.6 (dbg)', 'SNOWLEOPARD', 'DEBUG');
runPlatformAndBuildTypeTest('Webkit Win - GPU', 'XP', 'RELEASE');
runPlatformAndBuildTypeTest('Webkit Vista - GPU', 'VISTA', 'RELEASE');
runPlatformAndBuildTypeTest('Webkit Win7 - GPU', 'WIN7', 'RELEASE');
diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj b/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
index 41621e542..3483bec21 100644
--- a/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
+++ b/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
@@ -32,6 +32,7 @@
37A6895F148A9B50005100FA /* SubresourceErrorCrash.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37A6895D148A9B50005100FA /* SubresourceErrorCrash.mm */; };
37DC678D140D7C5000ABCCDB /* DOMRangeOfString.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37DC678B140D7C5000ABCCDB /* DOMRangeOfString.mm */; };
37DC6791140D7D7600ABCCDB /* DOMRangeOfString.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 37DC678F140D7D3A00ABCCDB /* DOMRangeOfString.html */; };
+ 440A1D3914A0103A008A66F2 /* KURL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 440A1D3814A0103A008A66F2 /* KURL.cpp */; };
4BFDFFA71314776C0061F24B /* HitTestResultNodeHandle_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFDFFA61314776C0061F24B /* HitTestResultNodeHandle_Bundle.cpp */; };
4BFDFFA9131477770061F24B /* HitTestResultNodeHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFDFFA8131477770061F24B /* HitTestResultNodeHandle.cpp */; };
520BCF4C141EB09E00937EA8 /* WebArchive_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 520BCF4A141EB09E00937EA8 /* WebArchive_Bundle.cpp */; };
@@ -181,6 +182,8 @@
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>"; };
+ 440A1D3814A0103A008A66F2 /* KURL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KURL.cpp; 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 +330,7 @@
BCB9E7FA112359A300A137E0 /* Test.h */,
BC131AA8117131FC00B69727 /* TestsController.cpp */,
BCB9E7C711234E3A00A137E0 /* TestsController.h */,
+ 44A622C114A0E2B60048515B /* WTFStringUtilities.h */,
);
name = Source;
sourceTree = "<group>";
@@ -353,6 +357,14 @@
name = Products;
sourceTree = "<group>";
};
+ 440A1D3614A01000008A66F2 /* WebCore */ = {
+ isa = PBXGroup;
+ children = (
+ 440A1D3814A0103A008A66F2 /* KURL.cpp */,
+ );
+ path = WebCore;
+ sourceTree = "<group>";
+ };
BC029B1A1486B23800817DA9 /* ns */ = {
isa = PBXGroup;
children = (
@@ -502,6 +514,7 @@
children = (
C08587F913FEC39B001EF4E5 /* TestWebKitAPI */,
C07E6CAD13FD67650038B22B /* mac */,
+ 440A1D3614A01000008A66F2 /* WebCore */,
BC9096411255616000083756 /* WebKit2 */,
BC3C4C6F14575B1D0025FB62 /* WebKit2 Objective-C */,
BC9096461255618900083756 /* WTF */,
@@ -711,6 +724,7 @@
1AA9E55914980A9900001A8A /* Functional.cpp in Sources */,
BCAA485814A044D40088FAC4 /* EditorCommands.mm in Sources */,
BC55F5F914AD78EE00484BE1 /* Vector.cpp in Sources */,
+ 440A1D3914A0103A008A66F2 /* KURL.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp b/Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp
index a968e2aa9..35b124441 100644
--- a/Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp
+++ b/Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp
@@ -29,20 +29,7 @@
*/
#include "config.h"
-#include <wtf/Assertions.h>
-#include <wtf/text/CString.h>
-#include <wtf/text/StringBuilder.h>
-#include <wtf/text/WTFString.h>
-
-namespace WTF {
-
-// For EXPECT_EQ(String, String)
-std::ostream& operator<<(std::ostream& os, const String& string)
-{
- return os << string.utf8().data();
-}
-
-}
+#include "WTFStringUtilities.h"
namespace TestWebKitAPI {
diff --git a/Tools/TestWebKitAPI/Tests/WebCore/KURL.cpp b/Tools/TestWebKitAPI/Tests/WebCore/KURL.cpp
new file mode 100644
index 000000000..66f580805
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebCore/KURL.cpp
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2011, 2012 Apple 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#include "config.h"
+#include "WTFStringUtilities.h"
+#include <WebCore/KURL.h>
+#include <wtf/MainThread.h>
+
+using namespace WebCore;
+
+namespace TestWebKitAPI {
+
+class WebCore: public testing::Test {
+public:
+ virtual void SetUp()
+ {
+ WTF::initializeMainThread();
+ }
+};
+
+TEST_F(WebCore, KURLConstructorDefault)
+{
+ KURL kurl;
+
+ EXPECT_FALSE(kurl.hasPath());
+ EXPECT_TRUE(kurl.isEmpty());
+ EXPECT_TRUE(kurl.isNull());
+ EXPECT_FALSE(kurl.isValid());
+}
+
+TEST_F(WebCore, KURLConstructorConstChar)
+{
+ KURL kurl(ParsedURLString, "http://username:password@www.example.com:8080/index.html?var=val#fragment");
+
+ EXPECT_TRUE(kurl.hasPath());
+ EXPECT_FALSE(kurl.isEmpty());
+ EXPECT_FALSE(kurl.isNull());
+ EXPECT_TRUE(kurl.isValid());
+
+ EXPECT_EQ(String("http"), kurl.protocol());
+ EXPECT_EQ(String("www.example.com"), kurl.host());
+ EXPECT_TRUE(kurl.hasPort());
+ EXPECT_EQ(8080, kurl.port());
+ EXPECT_EQ(String("username"), kurl.user());
+ EXPECT_EQ(String("password"), kurl.pass());
+ EXPECT_EQ(String("/index.html"), kurl.path());
+ EXPECT_EQ(String("index.html"), kurl.lastPathComponent());
+ EXPECT_EQ(String("var=val"), kurl.query());
+ EXPECT_TRUE(kurl.hasFragmentIdentifier());
+ EXPECT_EQ(String("fragment"), kurl.fragmentIdentifier());
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/mac/RenderedImageFromDOMRange.mm b/Tools/TestWebKitAPI/Tests/mac/RenderedImageFromDOMRange.mm
index 4bda16798..5ad43bd25 100644
--- a/Tools/TestWebKitAPI/Tests/mac/RenderedImageFromDOMRange.mm
+++ b/Tools/TestWebKitAPI/Tests/mac/RenderedImageFromDOMRange.mm
@@ -58,13 +58,18 @@ TEST(WebKit1, RenderedImageFromDOMRange)
DOMDocument *document = webView.get().mainFrameDocument;
DOMRange *range = [document createRange];
- [range selectNode:[document getElementById:@"target"]];
+ DOMNode *target = [document getElementById:@"target"];
+ [range selectNode:target];
NSImage *actualImage = [range renderedImageForcingBlackText:YES];
[webView.get() setSelectedDOMRange:range affinity:NSSelectionAffinityDownstream];
id <WebDocumentView> documentView = webView.get().mainFrame.frameView.documentView;
NSImage *expectedImage = [(id <WebDocumentSelection>)documentView selectionImageForcingBlackText:YES];
EXPECT_TRUE([actualImage.TIFFRepresentation isEqual:expectedImage.TIFFRepresentation]);
+
+ [target.parentElement.style setProperty:@"-webkit-user-select" value:@"none" priority:nil];
+ NSImage *actualImageWithUserSelectNone = [range renderedImageForcingBlackText:YES];
+ EXPECT_TRUE([actualImageWithUserSelectNone.TIFFRepresentation isEqual:expectedImage.TIFFRepresentation]);
}
} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/WTFStringUtilities.h b/Tools/TestWebKitAPI/WTFStringUtilities.h
new file mode 100644
index 000000000..29a876788
--- /dev/null
+++ b/Tools/TestWebKitAPI/WTFStringUtilities.h
@@ -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
diff --git a/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp b/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp
index 631a02ec5..78b87105b 100644
--- a/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp
+++ b/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp
@@ -59,9 +59,9 @@ static CGContextRef createCGContextFromImage(WKImageRef wkImage, FlipGraphicsCon
size_t rowBytes = (4 * pixelsWide + 63) & ~63;
void* buffer = calloc(pixelsHigh, rowBytes);
- CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
- CGContextRef context = CGBitmapContextCreate(buffer, pixelsWide, pixelsHigh, 8, rowBytes, colorSpace, kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host);
- CGColorSpaceRelease(colorSpace);
+ // Creating this bitmap in the device color space should prevent any color conversion when the image of the web view is drawn into it.
+ RetainPtr<CGColorSpaceRef> colorSpace(AdoptCF, CGColorSpaceCreateDeviceRGB());
+ CGContextRef context = CGBitmapContextCreate(buffer, pixelsWide, pixelsHigh, 8, rowBytes, colorSpace.get(), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host);
if (flip == FlipGraphicsContext) {
CGContextSaveGState(context);
@@ -95,15 +95,14 @@ void computeMD5HashStringForContext(CGContextRef bitmapContext, char hashString[
md5.addBytes(buffer);
bitmapData += bytesPerRow;
}
- } else {
+ } else
#endif
+ {
for (unsigned row = 0; row < pixelsHigh; row++) {
md5.addBytes(bitmapData, 4 * pixelsWide);
bitmapData += bytesPerRow;
}
-#if PLATFORM(MAC)
}
-#endif
Vector<uint8_t, 16> hash;
md5.checksum(hash);
diff --git a/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm b/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm
index 631779072..eb7e98b41 100644
--- a/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm
+++ b/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm
@@ -56,7 +56,7 @@ PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGro
NSRect windowRect = NSOffsetRect(rect, -10000, [(NSScreen *)[[NSScreen screens] objectAtIndex:0] frame].size.height - rect.size.height + 10000);
m_window = [[WebKitTestRunnerWindow alloc] initWithContentRect:windowRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES];
m_window.platformWebView = this;
- [m_window setColorSpace:[NSColorSpace genericRGBColorSpace]];
+ [m_window setColorSpace:[[NSScreen mainScreen] colorSpace]];
[[m_window contentView] addSubview:m_view];
[m_window orderBack:nil];
[m_window setReleasedWhenClosed:NO];
@@ -132,6 +132,9 @@ WKRetainPtr<WKImageRef> PlatformWebView::windowSnapshotImage()
{
[m_view display];
RetainPtr<CGImageRef> windowSnapshotImage(AdoptCF, CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, [m_window windowNumber], kCGWindowImageBoundsIgnoreFraming | kCGWindowImageShouldBeOpaque));
+
+ // windowSnapshotImage will be in the display's color space, but WKImageCreateFromCGImage() will draw
+ // this image into a GenericRGB bitmap context, so the returned image is GenericRGB.
return adoptWK(WKImageCreateFromCGImage(windowSnapshotImage.get(), 0));
}
diff --git a/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp b/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp
index 0b8a7d1ab..13a33f8bc 100644
--- a/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp
+++ b/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp
@@ -117,12 +117,12 @@ void PlatformWebView::setWindowFrame(WKRect wkRect)
bool PlatformWebView::sendEvent(QEvent* event)
{
- return QCoreApplication::sendEvent(m_view->page(), event);
+ return QCoreApplication::sendEvent(m_view, event);
}
void PlatformWebView::postEvent(QEvent* event)
{
- QCoreApplication::postEvent(m_view->page(), event);
+ QCoreApplication::postEvent(m_view, event);
}
void PlatformWebView::addChromeInputField()
diff --git a/Tools/qmake/mkspecs/features/features.prf b/Tools/qmake/mkspecs/features/features.prf
index 438ec9106..79c904c13 100644
--- a/Tools/qmake/mkspecs/features/features.prf
+++ b/Tools/qmake/mkspecs/features/features.prf
@@ -64,6 +64,7 @@ haveQt(4):unix:!mac:!embedded {
!contains(DEFINES, ENABLE_QUOTA=.): DEFINES += ENABLE_QUOTA=0
!contains(DEFINES, ENABLE_DASHBOARD_SUPPORT=.): DEFINES += ENABLE_DASHBOARD_SUPPORT=0
!contains(DEFINES, ENABLE_FILTERS=.): DEFINES += ENABLE_FILTERS=1
+!contains(DEFINES, ENABLE_CSS_FILTERS=.): DEFINES += ENABLE_CSS_FILTERS=1
!contains(DEFINES, ENABLE_SHARED_WORKERS=.): DEFINES += ENABLE_SHARED_WORKERS=1
!contains(DEFINES, ENABLE_WORKERS=.): DEFINES += ENABLE_WORKERS=1
!contains(DEFINES, ENABLE_DETAILS=.): DEFINES += ENABLE_DETAILS=1
@@ -214,6 +215,7 @@ contains(DEFINES, ENABLE_SHARED_WORKERS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE
contains(DEFINES, ENABLE_VIDEO=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_VIDEO=1
contains(DEFINES, ENABLE_XSLT=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_XSLT=1
contains(DEFINES, ENABLE_FILTERS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_FILTERS=1
+contains(DEFINES, ENABLE_CSS_FILTERS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_CSS_FILTERS=1
contains(DEFINES, ENABLE_SVG=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_SVG=1
contains(DEFINES, ENABLE_SVG_FONTS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_SVG_FONTS=1
contains(DEFINES, ENABLE_JAVASCRIPT_DEBUGGER=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_JAVASCRIPT_DEBUGGER=1
diff --git a/Tools/qmake/mkspecs/features/minimal_qt.prf b/Tools/qmake/mkspecs/features/minimal_qt.prf
index 4bc413180..34e2d39ee 100644
--- a/Tools/qmake/mkspecs/features/minimal_qt.prf
+++ b/Tools/qmake/mkspecs/features/minimal_qt.prf
@@ -27,7 +27,6 @@ DEFINES *= \
QT_NO_SYSTEMTRAYICON \
QT_NO_TEMPORARYFILE \
QT_NO_TOOLTIP \
- QT_NO_UITOOLS \
QT_NO_UNDOCOMMAND \
QT_NO_UNDOSTACK \
QT_NO_XRENDER
diff --git a/Tools/qmake/mkspecs/features/uitools.prf b/Tools/qmake/mkspecs/features/uitools.prf
deleted file mode 100644
index e96867c8a..000000000
--- a/Tools/qmake/mkspecs/features/uitools.prf
+++ /dev/null
@@ -1,23 +0,0 @@
-# -------------------------------------------------------------------
-# This file ensures that QtUiTools is available before including the
-# feature.
-#
-# See 'Tools/qmake/README' for an overview of the build system
-# -------------------------------------------------------------------
-
-# Disable by default
-CONFIG -= uitools
-
-haveQt(5) {
- !isEmpty(QT.uitools.name): CONFIG += uitools
-} else {
- # 4.x
- libraryName = $$fromfile($$[QT_INSTALL_LIBS]/libQtUiTools.prl, QMAKE_PRL_TARGET)
- !isEmpty(libraryName):exists($$[QT_INSTALL_LIBS]/$$libraryName): CONFIG += uitools
-}
-
-CONFIG(uitools):load(uitools)
-else {
- !build_pass: message("QtUiTools library not found. QWidget plugin loading will be disabled")
- DEFINES *= QT_NO_UITOOLS
-}