Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/chromium_wpt_unittest.py

Issue 2439153002: Script for exporting WPT (Closed)
Patch Set: Fix spacing issues Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import unittest
6 from webkitpy.common.host_mock import MockHost
7 from webkitpy.common.system.executive_mock import MockExecutive2
8 from webkitpy.w3c.chromium_wpt import ChromiumWPT
9
10
11 class ChromiumWPTTest(unittest.TestCase):
12
13 def test_has_changes_in_wpt(self):
14 host = MockHost()
15
16 def run_command_fn(_):
17 return ("something/something.html\n"
18 "third_party/WebKit/LayoutTests/imported/wpt/something.html\ n")
19
20 host.executive = MockExecutive2(run_command_fn=run_command_fn)
21 chromium_wpt = ChromiumWPT(host)
22
23 self.assertTrue(chromium_wpt.has_changes_in_wpt('sha'))
24
25 def test_has_changes_in_wpt_looks_at_start_of_string(self):
26 host = MockHost()
27
28 def run_command_fn(_):
29 return ("something/something.html\n"
30 "something/third_party/WebKit/LayoutTests/imported/wpt/somet hing.html\n")
31
32 host.executive = MockExecutive2(run_command_fn=run_command_fn)
33 chromium_wpt = ChromiumWPT(host)
34
35 self.assertFalse(chromium_wpt.has_changes_in_wpt('sha'))
36
37 def test_has_changes_in_wpt_does_not_count_expectation_files(self):
38 host = MockHost()
39
40 def run_command_fn(_):
41 return ("something/something.html\n"
42 "third_party/WebKit/LayoutTests/imported/wpt/something-expec ted.html\n"
43 "-expected.txt\n")
44
45 host.executive = MockExecutive2(run_command_fn=run_command_fn)
46 chromium_wpt = ChromiumWPT(host)
47
48 self.assertFalse(chromium_wpt.has_changes_in_wpt('sha'))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698