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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/net/layouttestresults_unittest.py

Issue 1847613002: Remove unused imports in webkitpy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months 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
1 # Copyright (c) 2010, Google Inc. All rights reserved. 1 # Copyright (c) 2010, Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 11 matching lines...) Expand all
22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 28
29 import unittest 29 import unittest
30 30
31 from webkitpy.common.net.layouttestresults import LayoutTestResults 31 from webkitpy.common.net.layouttestresults import LayoutTestResults
32 from webkitpy.common.system.outputcapture import OutputCapture
33 from webkitpy.layout_tests.models import test_results
34 from webkitpy.layout_tests.models import test_failures
35 from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup
36 32
37 33
38 class LayoutTestResultsTest(unittest.TestCase): 34 class LayoutTestResultsTest(unittest.TestCase):
39 # The real files have no whitespace, but newlines make this much more readab le. 35 # The real files have no whitespace, but newlines make this much more readab le.
40 example_full_results_json = """ADD_RESULTS({ 36 example_full_results_json = """ADD_RESULTS({
41 "tests": { 37 "tests": {
42 "fast": { 38 "fast": {
43 "dom": { 39 "dom": {
44 "prototype-inheritance.html": { 40 "prototype-inheritance.html": {
45 "expected": "PASS", 41 "expected": "PASS",
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 self.assertFalse(LayoutTestResults.results_from_string('ADD_RESULTS({"te sts":{},"interrupted":false});').run_was_interrupted()) 95 self.assertFalse(LayoutTestResults.results_from_string('ADD_RESULTS({"te sts":{},"interrupted":false});').run_was_interrupted())
100 96
101 def test_chromium_revision(self): 97 def test_chromium_revision(self):
102 self.assertEqual(LayoutTestResults.results_from_string(self.example_full _results_json).chromium_revision(), 1234) 98 self.assertEqual(LayoutTestResults.results_from_string(self.example_full _results_json).chromium_revision(), 1234)
103 99
104 def test_actual_results(self): 100 def test_actual_results(self):
105 results = LayoutTestResults.results_from_string(self.example_full_result s_json) 101 results = LayoutTestResults.results_from_string(self.example_full_result s_json)
106 self.assertEqual(results.actual_results("fast/dom/prototype-banana.html" ), "PASS") 102 self.assertEqual(results.actual_results("fast/dom/prototype-banana.html" ), "PASS")
107 self.assertEqual(results.actual_results("fast/dom/prototype-taco.html"), "PASS TEXT") 103 self.assertEqual(results.actual_results("fast/dom/prototype-taco.html"), "PASS TEXT")
108 self.assertEqual(results.actual_results("nonexistant.html"), "") 104 self.assertEqual(results.actual_results("nonexistant.html"), "")
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698