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

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

Issue 1846093002: Revert of 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
32 36
33 37
34 class LayoutTestResultsTest(unittest.TestCase): 38 class LayoutTestResultsTest(unittest.TestCase):
35 # The real files have no whitespace, but newlines make this much more readab le. 39 # The real files have no whitespace, but newlines make this much more readab le.
36 example_full_results_json = """ADD_RESULTS({ 40 example_full_results_json = """ADD_RESULTS({
37 "tests": { 41 "tests": {
38 "fast": { 42 "fast": {
39 "dom": { 43 "dom": {
40 "prototype-inheritance.html": { 44 "prototype-inheritance.html": {
41 "expected": "PASS", 45 "expected": "PASS",
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 self.assertFalse(LayoutTestResults.results_from_string('ADD_RESULTS({"te sts":{},"interrupted":false});').run_was_interrupted()) 99 self.assertFalse(LayoutTestResults.results_from_string('ADD_RESULTS({"te sts":{},"interrupted":false});').run_was_interrupted())
96 100
97 def test_chromium_revision(self): 101 def test_chromium_revision(self):
98 self.assertEqual(LayoutTestResults.results_from_string(self.example_full _results_json).chromium_revision(), 1234) 102 self.assertEqual(LayoutTestResults.results_from_string(self.example_full _results_json).chromium_revision(), 1234)
99 103
100 def test_actual_results(self): 104 def test_actual_results(self):
101 results = LayoutTestResults.results_from_string(self.example_full_result s_json) 105 results = LayoutTestResults.results_from_string(self.example_full_result s_json)
102 self.assertEqual(results.actual_results("fast/dom/prototype-banana.html" ), "PASS") 106 self.assertEqual(results.actual_results("fast/dom/prototype-banana.html" ), "PASS")
103 self.assertEqual(results.actual_results("fast/dom/prototype-taco.html"), "PASS TEXT") 107 self.assertEqual(results.actual_results("fast/dom/prototype-taco.html"), "PASS TEXT")
104 self.assertEqual(results.actual_results("nonexistant.html"), "") 108 self.assertEqual(results.actual_results("nonexistant.html"), "")
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698