Skip to content

Commit 81f891f

Browse files
tkent-googleCommit Bot
authored and
Commit Bot
committed
blinkpy: Update "layout test" in various places to "web test"
Bug: 843412 Change-Id: I1bd7de018b74d32c17ed36c3cf4b0e56a4b7b467 Reviewed-on: https://chromium-review.googlesource.com/c/1371404 Commit-Queue: Kent Tamura <[email protected]> Reviewed-by: Robert Ma <[email protected]> Cr-Commit-Position: refs/heads/master@{#615751}
1 parent a0d2a9b commit 81f891f

26 files changed

+56
-56
lines changed

docs/how_to_extend_web_test_framework.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ and MacPort (and maybe the android port class) should be extended as they
108108
provide platform specific overrides/extensions that implement most of the
109109
important functionality. While there are many functions in Port, overriding one
110110
function will affect most of the other ones to get the desired behavior. For
111-
example, if `layout_tests_dir()` is overridden, not only will the code look for
111+
example, if `web_tests_dir()` is overridden, not only will the code look for
112112
tests in that directory, but it will find the correct TestExpectations file, the
113113
platform specific expected files, etc.
114114

@@ -125,7 +125,7 @@ Here are some of the functions that most likely need to be overridden.
125125
* This should return the name of the program test p. By default it returns
126126
‘content_shell’, but you want to have it return the program you want to
127127
run, such as `chrome` or `browser_tests`.
128-
* `layout_tests_dir`
128+
* `web_tests_dir`
129129
* This tells the port where to look for all the and everything associated
130130
with them such as resources files.
131131
* By default it returns the absolute path to the web tests directory.
@@ -172,7 +172,7 @@ and has stdout, stdin, stderr.
172172
#### Goals
173173

174174
Your goal for this part of the project is to create a program (or extend a
175-
program) to interface with the web test framework. The layout test framework
175+
program) to interface with the web test framework. The web test framework
176176
will communicate with this program to tell it what to do and it will accept data
177177
from this program to perform the regression testing or create new base line
178178
files.

third_party/blink/tools/blinkpy/common/checkout/diff_parser_unittest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def test_diff_parser(self, parser=None):
7878
self.assertEqual((87, 90), diff.lines[22][0:2])
7979

8080
# Check if a newly added file is correctly handled.
81-
diff = parser.files['LayoutTests/platform/mac/fast/flexbox/box-orient-button-expected.checksum']
81+
diff = parser.files['web_tests/platform/mac/fast/flexbox/box-orient-button-expected.checksum']
8282
self.assertEqual(1, len(diff.lines))
8383
self.assertEqual((0, 1), diff.lines[0][0:2])
8484

third_party/blink/tools/blinkpy/common/checkout/diff_test_data.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
}
7070
7171
bool StyleRareInheritedData::shadowDataEquivalent(const StyleRareInheritedData& o) const
72-
diff --git a/LayoutTests/platform/mac/fast/flexbox/box-orient-button-expected.checksum b/LayoutTests/platform/mac/fast/flexbox/box-orient-button-expected.checksum
72+
diff --git a/web_tests/platform/mac/fast/flexbox/box-orient-button-expected.checksum b/web_tests/platform/mac/fast/flexbox/box-orient-button-expected.checksum
7373
new file mode 100644
7474
index 0000000..6db26bd
7575
--- /dev/null

third_party/blink/tools/blinkpy/common/net/web_test_results_unittest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class WebTestResultsTest(unittest.TestCase):
8787
},
8888
"skipped": 450,
8989
"num_regressions": 15,
90-
"layout_tests_dir": "/b/build/slave/Webkit_Mac10_5/build/src/third_party/WebKit/LayoutTests",
90+
"layout_tests_dir": "/b/build/slave/Webkit_Mac10_5/build/src/third_party/blink/web_tests",
9191
"version": 3,
9292
"num_passes": 77,
9393
"fixable": 1220,

third_party/blink/tools/blinkpy/common/unified_diff.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5-
"""A utility function to do text diffs of expected and actual layout test results."""
5+
"""A utility function to do text diffs of expected and actual web test results."""
66

77
import difflib
88

third_party/blink/tools/blinkpy/third_party/wpt/README.chromium

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
W3C Web Platform Tests in Blink Layout Tests
1+
W3C Web Platform Tests in Blink Web Tests
22

33
Design Doc: https://goo.gl/iXUaZd
44

@@ -28,7 +28,7 @@ changing the ports (HTTP/S, WS/S), make sure to also:
2828

2929
- update `WPT_HOST_AND_PORTS` in
3030
`//third_party/blink/tools/blinkpy/web_tests/port/driver.py`
31-
- update LayoutTestContentBrowserClient::GetOriginsRequiringDedicatedProcess()
31+
- update WebTestContentBrowserClient::GetOriginsRequiringDedicatedProcess()
3232

3333
checkout.sh
3434
===========

third_party/blink/tools/blinkpy/tool/commands/analyze_baselines_unittest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class _FakeOptimizer(BaselineOptimizer):
1313

1414
def read_results_by_directory(self, baseline_name):
1515
if baseline_name.endswith('txt'):
16-
return {'LayoutTests/passes/text.html': '123456'}
16+
return {'web_tests/passes/text.html': '123456'}
1717
return {}
1818

1919

third_party/blink/tools/blinkpy/tool/commands/rebaseline_cl_unittest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def setUp(self):
101101
self._write(path, 'contents')
102102

103103
self.mac_port.host.filesystem.write_text_file(
104-
'/test.checkout/LayoutTests/external/wpt/MANIFEST.json', '{}')
104+
'/test.checkout/web_tests/external/wpt/MANIFEST.json', '{}')
105105

106106
def tearDown(self):
107107
BaseTestCase.tearDown(self)

third_party/blink/tools/blinkpy/w3c/chromium_commit_mock.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ def short_sha(self):
2929

3030
def filtered_changed_files(self):
3131
return [
32-
'third_party/WebKit/LayoutTests/external/wpt/one.html',
33-
'third_party/WebKit/LayoutTests/external/wpt/two.html',
32+
'third_party/blink/web_tests/external/wpt/one.html',
33+
'third_party/blink/web_tests/external/wpt/two.html',
3434
]
3535

3636
def url(self):

third_party/blink/tools/blinkpy/web_tests/builder_list.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2727
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828

29-
"""Represents a set of builder bots running layout tests.
29+
"""Represents a set of builder bots running web tests.
3030
31-
This class is used to hold a list of builder bots running layout tests and their
31+
This class is used to hold a list of builder bots running web tests and their
3232
corresponding port names and TestExpectations specifiers.
3333
"""
3434

third_party/blink/tools/blinkpy/web_tests/merge_results.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5-
"""Classes for merging layout tests results directories together.
5+
"""Classes for merging web tests results directories together.
66
77
This is split into three parts:
88
99
* Generic code to merge JSON data together.
1010
* Generic code to merge directories together.
11-
* Code to specifically merge the layout tests result data together.
11+
* Code to specifically merge the web tests result data together.
1212
1313
The JSON data merger will recursively merge dictionaries by default.
1414
@@ -518,7 +518,7 @@ def merge(self, output_dir, to_merge_dirs):
518518
break
519519

520520

521-
# Classes specific to merging LayoutTest results directory.
521+
# Classes specific to merging web test results directory.
522522
# ------------------------------------------------------------------------
523523

524524

@@ -577,7 +577,7 @@ def __init__(self, allow_unknown_if_matching=False):
577577
NameRegexMatch(':interrupted$'),
578578
lambda o, name=None: bool(sum(o)))
579579

580-
# Layout test directory value is randomly created on each shard, so
580+
# Web test directory value is randomly created on each shard, so
581581
# clear it.
582582
self.add_helper(
583583
NameRegexMatch(':layout_tests_dir$'),
@@ -596,8 +596,8 @@ def fallback_matcher(self, objs, name=None):
596596
return JSONMerger.fallback_matcher(self, objs, name)
597597

598598

599-
class LayoutTestDirMerger(DirMerger):
600-
"""Merge layout test result directory."""
599+
class WebTestDirMerger(DirMerger):
600+
"""Merge web test result directory."""
601601

602602
def __init__(self, filesystem=None,
603603
results_json_value_overrides=None,
@@ -674,7 +674,7 @@ def main(argv):
674674

675675
parser = argparse.ArgumentParser()
676676
parser.description = """\
677-
Merges sharded layout test results into a single output directory.
677+
Merges sharded web test results into a single output directory.
678678
"""
679679
parser.epilog = """\
680680
@@ -812,7 +812,7 @@ def main(argv):
812812
results_json_value_overrides[result_key] = build_properties[build_prop_key]
813813
logging.debug('results_json_value_overrides: %r', results_json_value_overrides)
814814

815-
merger = LayoutTestDirMerger(
815+
merger = WebTestDirMerger(
816816
results_json_value_overrides=results_json_value_overrides,
817817
results_json_allow_unknown_if_matching=args.results_json_allow_unknown_if_matching)
818818

third_party/blink/tools/blinkpy/web_tests/merge_results_unittest.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ def test_seconds_since_epoch(self):
541541
merger.merge([{'seconds_since_epoch': 12}, {}]))
542542

543543

544-
class LayoutTestDirMergerTests(unittest.TestCase):
544+
class WebTestDirMergerTests(unittest.TestCase):
545545

546546
# JSON files for shard 1
547547
# Shard1 has the following tests;
@@ -555,7 +555,7 @@ class LayoutTestDirMergerTests(unittest.TestCase):
555555
"chromium_revision": "123",
556556
"fixable": 1,
557557
"interrupted": false,
558-
"layout_tests_dir": "/b/s/w/irJ1McdS/third_party/WebKit/LayoutTests",
558+
"layout_tests_dir": "/b/s/w/irJ1McdS/third_party/blink/web_tests",
559559
"num_failures_by_type": {
560560
"AUDIO": 2,
561561
"CRASH": 3
@@ -677,7 +677,7 @@ class LayoutTestDirMergerTests(unittest.TestCase):
677677
"chromium_revision": "123",
678678
"fixable": 9,
679679
"interrupted": false,
680-
"layout_tests_dir": "/b/s/w/sadfa124/third_party/WebKit/LayoutTests",
680+
"layout_tests_dir": "/b/s/w/sadfa124/third_party/blink/web_tests",
681681
"num_failures_by_type": {
682682
"AUDIO": 10,
683683
"CRASH": 11
@@ -772,7 +772,7 @@ class LayoutTestDirMergerTests(unittest.TestCase):
772772
[Wed Mar 01 22:20:07.400802 2017] [ssl:warn] [pid 15010] AH01909: RSA certificate configured for 127.0.0.1:443 does NOT include an ID which matches the server name
773773
"""
774774

775-
layout_test_filesystem = {
775+
web_test_filesystem = {
776776
# Files for shard0
777777
'/shards/0/layout-test-results/access_log.txt': shard0_access_log,
778778
'/shards/0/layout-test-results/archived_results.json': shard0_archived_results_json,
@@ -1008,7 +1008,7 @@ class LayoutTestDirMergerTests(unittest.TestCase):
10081008
[Wed Mar 01 22:20:07.400802 2017] [ssl:warn] [pid 15010] AH01909: RSA certificate configured for 127.0.0.1:443 does NOT include an ID which matches the server name
10091009
"""
10101010

1011-
layout_test_output_filesystem = {
1011+
web_test_output_filesystem = {
10121012
'/out/layout-test-results/access_log.txt': output_access_log,
10131013
'/out/layout-test-results/archived_results.json': output_archived_results_json,
10141014
'/out/layout-test-results/error_log.txt': output_error_log,
@@ -1040,11 +1040,11 @@ class LayoutTestDirMergerTests(unittest.TestCase):
10401040
}
10411041

10421042
def test(self):
1043-
fs = MockFileSystem(self.layout_test_filesystem)
1043+
fs = MockFileSystem(self.web_test_filesystem)
10441044

1045-
merger = merge_results.LayoutTestDirMerger(fs, results_json_value_overrides={'layout_tests_dir': 'src'})
1045+
merger = merge_results.WebTestDirMerger(fs, results_json_value_overrides={'layout_tests_dir': 'src'})
10461046
merger.merge('/out', ['/shards/0', '/shards/1'])
10471047

1048-
for fname, contents in self.layout_test_output_filesystem.items():
1048+
for fname, contents in self.web_test_output_filesystem.items():
10491049
self.assertIn(fname, fs.files)
10501050
self.assertMultiLineEqual(contents, fs.files[fname])

third_party/blink/tools/blinkpy/web_tests/models/test_expectations.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2727
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828

29-
"""A helper class for reading in and dealing with tests expectations for layout tests."""
29+
"""A helper class for reading in and dealing with tests expectations for web tests."""
3030

3131
from collections import defaultdict
3232

@@ -880,7 +880,7 @@ def _already_seen_better_match(self, test, expectation_line):
880880

881881
class TestExpectations(object):
882882
"""Test expectations consist of lines with specifications of what
883-
to expect from layout test cases. The test cases can be directories
883+
to expect from web test cases. The test cases can be directories
884884
in which case the expectations apply to all test cases in that
885885
directory and any subdirectory. The format is along the lines of:
886886

third_party/blink/tools/blinkpy/web_tests/models/test_run_results.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def __init__(self, expectations, num_tests):
6161
self.unexpected_failures = 0
6262
self.unexpected_timeouts = 0
6363

64-
# The wall clock time spent running the tests (layout_test_runner.run()).
64+
# The wall clock time spent running the tests (web_test_runner.run()).
6565
self.run_time = 0
6666

6767
# Map of test name to the *last* result for the test.

third_party/blink/tools/blinkpy/web_tests/port/browser_test_driver.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def start(self, per_test_args, deadline):
4343
assign it to the stdin of the process that is owned by this driver's
4444
server process.
4545
"""
46-
# FIXME(ivandavid): Need to handle case where the layout test doesn't
46+
# FIXME(ivandavid): Need to handle case where the web test doesn't
4747
# get a file name.
4848
new_cmd_line = self.cmd_line(per_test_args)
4949
if not self._server_process or new_cmd_line != self._current_cmd_line:
@@ -52,7 +52,7 @@ def start(self, per_test_args, deadline):
5252
self._open_stdin_path(deadline)
5353

5454
# Gets the path of the directory that the file for stdin communication is
55-
# in. Since the browser test cannot clean it up, the layout test framework
55+
# in. Since the browser test cannot clean it up, the web test framework
5656
# will. Everything the browser test uses is stored in the same directory as
5757
# the stdin file, so deleting that directory recursively will remove all the
5858
# other temp data, like the printed pdf. This function assumes the correct

third_party/blink/tools/blinkpy/web_tests/print_layout_test_times_unittest.py third_party/blink/tools/blinkpy/web_tests/print_web_test_times_unittest.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
import unittest
3030

3131
from blinkpy.common.host_mock import MockHost
32-
from blinkpy.web_tests.print_layout_test_times import main
32+
from blinkpy.web_tests.print_web_test_times import main
3333

3434

35-
class PrintLayoutTestTimesTest(unittest.TestCase):
35+
class PrintWebTestTimesTest(unittest.TestCase):
3636

3737
def check(self, args, expected_output, files=None):
3838
host = MockHost()

third_party/blink/tools/blinkpy/web_tests/run_webkit_tests.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def parse_args(args):
114114
action='append',
115115
default=[],
116116
dest='adb_devices',
117-
help='Run Android layout tests on these devices'),
117+
help='Run Android web tests on these devices'),
118118
# FIXME: Flip this to be off by default once we can log the
119119
# device setup more cleanly.
120120
optparse.make_option(
@@ -300,7 +300,7 @@ def parse_args(args):
300300
help='Number of times to run the set of tests (e.g. ABCABCABC)'),
301301
optparse.make_option(
302302
'--layout-tests-directory',
303-
help=('Path to a custom layout tests directory')),
303+
help=('Path to a custom web tests directory')),
304304
optparse.make_option(
305305
'--max-locked-shards',
306306
type='int',
@@ -464,7 +464,7 @@ def parse_args(args):
464464
'--zero-tests-executed-ok',
465465
action='store_true',
466466
help='If set, exit with a success code when no tests are run.'
467-
' Used on trybots when layout tests are retried without patch.')
467+
' Used on trybots when web tests are retried without patch.')
468468
]))
469469

470470
option_group_definitions.append(
@@ -509,7 +509,7 @@ def parse_args(args):
509509
option_parser = optparse.OptionParser(
510510
prog='run_web_tests.py',
511511
usage='%prog [options] [tests]',
512-
description='Runs Blink layout tests as described in docs/testing/web_tests.md')
512+
description='Runs Blink web tests as described in docs/testing/web_tests.md')
513513

514514
for group_name, group_options in option_group_definitions:
515515
option_group = optparse.OptionGroup(option_parser, group_name)

third_party/blink/tools/blinkpy/web_tests/servers/cli_wrapper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"""A utility module for making standalone scripts to start servers.
3030
3131
Scripts in tools/ can use this module to start servers that are normally used
32-
for layout tests, outside of the layout test runner.
32+
for web tests, outside of the web test runner.
3333
"""
3434

3535
import logging

third_party/blink/tools/blinkpy/web_tests/servers/server_base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2727
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828

29-
"""Base class used to start servers used by the layout tests."""
29+
"""Base class used to start servers used by the web tests."""
3030

3131
import errno
3232
import logging
@@ -42,7 +42,7 @@ class ServerError(Exception):
4242

4343

4444
class ServerBase(object):
45-
"""A skeleton class for starting and stopping servers used by the layout tests."""
45+
"""A skeleton class for starting and stopping servers used by the web tests."""
4646

4747
def __init__(self, port_obj, output_dir):
4848
self._port_obj = port_obj

third_party/blink/tools/blinkpy/web_tests/views/printing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def print_summary(self, total_time, run_results):
165165
if self._options.timing:
166166
parallel_time = sum(result.total_run_time for result in run_results.results_by_name.values())
167167

168-
# There is serial overhead in layout_test_runner.run() that we can't easily account for when
168+
# There is serial overhead in web_test_runner.run() that we can't easily account for when
169169
# really running in parallel, but taking the min() ensures that in the worst case
170170
# (if parallel time is less than run_time) we do account for it.
171171
serial_time = total_time - min(run_results.run_time, parallel_time)

third_party/blink/tools/check_testharness_expected_pass.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
# Use of this source code is governed by a BSD-style license that can be
55
# found in the LICENSE file.
66

7-
"""Check if a LayoutTest expected file is an all-PASS testharness result.
7+
"""Check if a web test expected file is an all-PASS testharness result.
88
9-
LayoutTests/PRESUBMIT.py uses this script to identify generic all-PASS
9+
web_tests/PRESUBMIT.py uses this script to identify generic all-PASS
1010
testharness baselines, which are redundant because run_web_tests.py assumes
1111
all-PASS results for testharness tests when baselines are not found.
1212
"""

third_party/blink/tools/print_web_test_times.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@
3131
import sys
3232

3333
from blinkpy.common import host
34-
from blinkpy.web_tests import print_layout_test_times
34+
from blinkpy.web_tests import print_web_test_times
3535

36-
print_layout_test_times.main(host.Host(), sys.argv[1:])
36+
print_web_test_times.main(host.Host(), sys.argv[1:])

0 commit comments

Comments
 (0)