<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[160756] trunk/Tools</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/160756">160756</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2013-12-18 03:41:08 -0800 (Wed, 18 Dec 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Move expectation parsing out of the constructor of TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=125439

Patch by Dániel Bátyai &lt;Batyai.Daniel@stud.u-szeged.hu&gt; on 2013-12-18
Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
(LayoutTestRunnerTests._run_tests):
(LayoutTestRunnerTests.test_interrupt_if_at_failure_limits):
(LayoutTestRunnerTests.test_update_summary_with_result):
* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager.run):
* Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
(ManagerTest.test_look_for_new_crash_logs):
* Scripts/webkitpy/layout_tests/lint_test_expectations.py:
(lint):
* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectations.suffixes_for_expectations):
(TestExpectations.__init__):
(TestExpectations):
(TestExpectations.parse_generic_expectations):
(TestExpectations.parse_default_port_expectations):
(TestExpectations.parse_override_expectations):
(TestExpectations.parse_all_expectations):
* Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
(parse_exp):
(SkippedTests.check):
(SkippedTests.test_skipped_entry_dont_exist):
* Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py:
(run_results):
* Scripts/webkitpy/tool/commands/queries.py:
(PrintExpectations._model):
* Scripts/webkitpy/tool/commands/rebaseline.py:
(RebaselineTest._update_expectations_file):
(RebaselineExpectations._update_expectations_files):
(RebaselineExpectations._tests_to_rebaseline):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptswebkitpylayout_testscontrollerslayout_test_runner_unittestpy">trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py</a></li>
<li><a href="#trunkToolsScriptswebkitpylayout_testscontrollersmanagerpy">trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py</a></li>
<li><a href="#trunkToolsScriptswebkitpylayout_testscontrollersmanager_unittestpy">trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py</a></li>
<li><a href="#trunkToolsScriptswebkitpylayout_testslint_test_expectationspy">trunk/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations.py</a></li>
<li><a href="#trunkToolsScriptswebkitpylayout_testsmodelstest_expectationspy">trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py</a></li>
<li><a href="#trunkToolsScriptswebkitpylayout_testsmodelstest_expectations_unittestpy">trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py</a></li>
<li><a href="#trunkToolsScriptswebkitpylayout_testsmodelstest_run_results_unittestpy">trunk/Tools/Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolcommandsqueriespy">trunk/Tools/Scripts/webkitpy/tool/commands/queries.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolcommandsrebaselinepy">trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (160755 => 160756)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2013-12-18 07:37:08 UTC (rev 160755)
+++ trunk/Tools/ChangeLog        2013-12-18 11:41:08 UTC (rev 160756)
</span><span class="lines">@@ -1,3 +1,41 @@
</span><ins>+2013-12-18  Dániel Bátyai  &lt;Batyai.Daniel@stud.u-szeged.hu&gt;
+
+        Move expectation parsing out of the constructor of TestExpectations
+        https://bugs.webkit.org/show_bug.cgi?id=125439
+
+        Reviewed by Csaba Osztrogonác.
+
+        * Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
+        (LayoutTestRunnerTests._run_tests):
+        (LayoutTestRunnerTests.test_interrupt_if_at_failure_limits):
+        (LayoutTestRunnerTests.test_update_summary_with_result):
+        * Scripts/webkitpy/layout_tests/controllers/manager.py:
+        (Manager.run):
+        * Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
+        (ManagerTest.test_look_for_new_crash_logs):
+        * Scripts/webkitpy/layout_tests/lint_test_expectations.py:
+        (lint):
+        * Scripts/webkitpy/layout_tests/models/test_expectations.py:
+        (TestExpectations.suffixes_for_expectations):
+        (TestExpectations.__init__):
+        (TestExpectations):
+        (TestExpectations.parse_generic_expectations):
+        (TestExpectations.parse_default_port_expectations):
+        (TestExpectations.parse_override_expectations):
+        (TestExpectations.parse_all_expectations):
+        * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
+        (parse_exp):
+        (SkippedTests.check):
+        (SkippedTests.test_skipped_entry_dont_exist):
+        * Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py:
+        (run_results):
+        * Scripts/webkitpy/tool/commands/queries.py:
+        (PrintExpectations._model):
+        * Scripts/webkitpy/tool/commands/rebaseline.py:
+        (RebaselineTest._update_expectations_file):
+        (RebaselineExpectations._update_expectations_files):
+        (RebaselineExpectations._tests_to_rebaseline):
+
</ins><span class="cx"> 2013-12-17  Jer Noble  &lt;jer.noble@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix TimeRanges::intersectWith
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpylayout_testscontrollerslayout_test_runner_unittestpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py (160755 => 160756)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py        2013-12-18 07:37:08 UTC (rev 160755)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py        2013-12-18 11:41:08 UTC (rev 160756)
</span><span class="lines">@@ -104,6 +104,7 @@
</span><span class="cx">     def _run_tests(self, runner, tests):
</span><span class="cx">         test_inputs = [TestInput(test, 6000) for test in tests]
</span><span class="cx">         expectations = TestExpectations(runner._port, tests)
</span><ins>+        expectations.parse_all_expectations()
</ins><span class="cx">         runner.run_tests(expectations, test_inputs, set(),
</span><span class="cx">             num_workers=1, needs_http=any('http' in test for test in tests), needs_websockets=any(['websocket' in test for test in tests]), retrying=False)
</span><span class="cx"> 
</span><span class="lines">@@ -122,7 +123,9 @@
</span><span class="cx">         test_names = ['passes/text.html', 'passes/image.html']
</span><span class="cx">         runner._test_inputs = [TestInput(test_name, 6000) for test_name in test_names]
</span><span class="cx"> 
</span><del>-        run_results = TestRunResults(TestExpectations(runner._port, test_names), len(test_names))
</del><ins>+        expectations = TestExpectations(runner._port, test_names)
+        expectations.parse_all_expectations()
+        run_results = TestRunResults(expectations, len(test_names))
</ins><span class="cx">         run_results.unexpected_failures = 100
</span><span class="cx">         run_results.unexpected_crashes = 50
</span><span class="cx">         run_results.unexpected_timeouts = 50
</span><span class="lines">@@ -150,6 +153,7 @@
</span><span class="cx">         runner._options.pixel_tests = False
</span><span class="cx">         test = 'failures/expected/reftest.html'
</span><span class="cx">         expectations = TestExpectations(runner._port, tests=[test])
</span><ins>+        expectations.parse_all_expectations()
</ins><span class="cx">         runner._expectations = expectations
</span><span class="cx"> 
</span><span class="cx">         run_results = TestRunResults(expectations, 1)
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpylayout_testscontrollersmanagerpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py (160755 => 160756)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py        2013-12-18 07:37:08 UTC (rev 160755)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py        2013-12-18 11:41:08 UTC (rev 160756)
</span><span class="lines">@@ -182,6 +182,7 @@
</span><span class="cx"> 
</span><span class="cx">         self._printer.write_update(&quot;Parsing expectations ...&quot;)
</span><span class="cx">         self._expectations = test_expectations.TestExpectations(self._port, test_names, force_expectations_pass=self._options.force)
</span><ins>+        self._expectations.parse_all_expectations()
</ins><span class="cx"> 
</span><span class="cx">         tests_to_run, tests_to_skip = self._prepare_lists(paths, test_names)
</span><span class="cx">         self._printer.print_found(len(test_names), len(tests_to_run), self._options.repeat_each, self._options.iterations)
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpylayout_testscontrollersmanager_unittestpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py (160755 => 160756)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py        2013-12-18 07:37:08 UTC (rev 160755)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py        2013-12-18 11:41:08 UTC (rev 160756)
</span><span class="lines">@@ -85,6 +85,7 @@
</span><span class="cx">         port = host.port_factory.get('test-mac-leopard')
</span><span class="cx">         tests = ['failures/expected/crash.html']
</span><span class="cx">         expectations = test_expectations.TestExpectations(port, tests)
</span><ins>+        expectations.parse_all_expectations()
</ins><span class="cx">         run_results = TestRunResults(expectations, len(tests))
</span><span class="cx">         manager = get_manager()
</span><span class="cx">         manager._look_for_new_crash_logs(run_results, time.time())
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpylayout_testslint_test_expectationspy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations.py (160755 => 160756)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations.py        2013-12-18 07:37:08 UTC (rev 160755)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations.py        2013-12-18 11:41:08 UTC (rev 160756)
</span><span class="lines">@@ -66,8 +66,9 @@
</span><span class="cx">                     continue
</span><span class="cx"> 
</span><span class="cx">                 try:
</span><del>-                    test_expectations.TestExpectations(port_to_lint,
</del><ins>+                    expectations = test_expectations.TestExpectations(port_to_lint,
</ins><span class="cx">                         expectations_to_lint={expectations_file: expectations_dict[expectations_file]})
</span><ins>+                    expectations.parse_all_expectations()
</ins><span class="cx">                 except test_expectations.ParseError as e:
</span><span class="cx">                     lint_failed = True
</span><span class="cx">                     _log.error('')
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpylayout_testsmodelstest_expectationspy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py (160755 => 160756)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py        2013-12-18 07:37:08 UTC (rev 160755)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py        2013-12-18 11:41:08 UTC (rev 160756)
</span><span class="lines">@@ -830,9 +830,6 @@
</span><span class="cx">             suffixes.add('wav')
</span><span class="cx">         return set(suffixes)
</span><span class="cx"> 
</span><del>-    # FIXME: This constructor does too much work. We should move the actual parsing of
-    # the expectations into separate routines so that linting and handling overrides
-    # can be controlled separately, and the constructor can be more of a no-op.
</del><span class="cx">     def __init__(self, port, tests=None, include_generic=True, include_overrides=True, expectations_to_lint=None, force_expectations_pass=False):
</span><span class="cx">         self._full_test_list = tests
</span><span class="cx">         self._test_config = port.test_configuration()
</span><span class="lines">@@ -843,36 +840,45 @@
</span><span class="cx">         self._skipped_tests_warnings = []
</span><span class="cx">         self._expectations = []
</span><span class="cx">         self._force_expectations_pass = force_expectations_pass
</span><ins>+        self._include_generic = include_generic
+        self._include_overrides = include_overrides
+        self._expectations_to_lint = expectations_to_lint
</ins><span class="cx"> 
</span><del>-        expectations_dict = expectations_to_lint or port.expectations_dict()
-
-        expectations_dict_index = 0
-        # Populate generic expectations (if enabled by include_generic).
-        if port.path_to_generic_test_expectations_file() in expectations_dict:
-            if include_generic:
-                expectations = self._parser.parse(expectations_dict.keys()[expectations_dict_index], expectations_dict.values()[expectations_dict_index])
</del><ins>+    def parse_generic_expectations(self):
+        if self._port.path_to_generic_test_expectations_file() in self._expectations_dict:
+            if self._include_generic:
+                expectations = self._parser.parse(self._expectations_dict.keys()[self._expectations_dict_index], self._expectations_dict.values()[self._expectations_dict_index])
</ins><span class="cx">                 self._add_expectations(expectations)
</span><span class="cx">                 self._expectations += expectations
</span><del>-            expectations_dict_index += 1
</del><ins>+            self._expectations_dict_index += 1
</ins><span class="cx"> 
</span><del>-        # Populate default port expectations (always enabled).
-        if len(expectations_dict) &gt; expectations_dict_index:
-            expectations = self._parser.parse(expectations_dict.keys()[expectations_dict_index], expectations_dict.values()[expectations_dict_index])
</del><ins>+    def parse_default_port_expectations(self):
+        if len(self._expectations_dict) &gt; self._expectations_dict_index:
+            expectations = self._parser.parse(self._expectations_dict.keys()[self._expectations_dict_index], self._expectations_dict.values()[self._expectations_dict_index])
</ins><span class="cx">             self._add_expectations(expectations)
</span><span class="cx">             self._expectations += expectations
</span><del>-            expectations_dict_index += 1
</del><ins>+            self._expectations_dict_index += 1
</ins><span class="cx"> 
</span><del>-        # Populate override expectations (if enabled by include_overrides).
-        while len(expectations_dict) &gt; expectations_dict_index and include_overrides:
-            expectations = self._parser.parse(expectations_dict.keys()[expectations_dict_index], expectations_dict.values()[expectations_dict_index])
</del><ins>+    def parse_override_expectations(self):
+        while len(self._expectations_dict) &gt; self._expectations_dict_index and self._include_overrides:
+            expectations = self._parser.parse(self._expectations_dict.keys()[self._expectations_dict_index], self._expectations_dict.values()[self._expectations_dict_index])
</ins><span class="cx">             self._add_expectations(expectations)
</span><span class="cx">             self._expectations += expectations
</span><del>-            expectations_dict_index += 1
</del><ins>+            self._expectations_dict_index += 1
</ins><span class="cx"> 
</span><ins>+    def parse_all_expectations(self):
+        self._expectations_dict = self._expectations_to_lint or self._port.expectations_dict()
+        self._expectations_dict_index = 0
+
+        self._has_warnings = False
+
+        self.parse_generic_expectations()
+        self.parse_default_port_expectations()
+        self.parse_override_expectations()
+
</ins><span class="cx">         # FIXME: move ignore_tests into port.skipped_layout_tests()
</span><del>-        self.add_skipped_tests(port.skipped_layout_tests(tests).union(set(port.get_option('ignore_tests', []))))
</del><ins>+        self.add_skipped_tests(self._port.skipped_layout_tests(self._full_test_list).union(set(self._port.get_option('ignore_tests', []))))
</ins><span class="cx"> 
</span><del>-        self._has_warnings = False
</del><span class="cx">         self._report_warnings()
</span><span class="cx">         self._process_tests_without_expectations()
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpylayout_testsmodelstest_expectations_unittestpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py (160755 => 160756)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py        2013-12-18 07:37:08 UTC (rev 160755)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py        2013-12-18 11:41:08 UTC (rev 160756)
</span><span class="lines">@@ -78,6 +78,7 @@
</span><span class="cx">         self._port.expectations_dict = lambda: expectations_dict
</span><span class="cx">         expectations_to_lint = expectations_dict if is_lint_mode else None
</span><span class="cx">         self._exp = TestExpectations(self._port, self.get_basic_tests(), expectations_to_lint=expectations_to_lint)
</span><ins>+        self._exp.parse_all_expectations()
</ins><span class="cx"> 
</span><span class="cx">     def assert_exp(self, test, result):
</span><span class="cx">         self.assertEqual(self._exp.model().get_expectations(test),
</span><span class="lines">@@ -251,6 +252,7 @@
</span><span class="cx">         port.skipped_layout_tests = lambda tests: set(skips)
</span><span class="cx">         expectations_to_lint = expectations_dict if lint else None
</span><span class="cx">         exp = TestExpectations(port, ['failures/expected/text.html'], expectations_to_lint=expectations_to_lint)
</span><ins>+        exp.parse_all_expectations()
</ins><span class="cx"> 
</span><span class="cx">         # Check that the expectation is for BUG_DUMMY SKIP : ... [ Pass ]
</span><span class="cx">         self.assertEqual(exp.model().get_modifiers('failures/expected/text.html'),
</span><span class="lines">@@ -288,6 +290,7 @@
</span><span class="cx">         capture = OutputCapture()
</span><span class="cx">         capture.capture_output()
</span><span class="cx">         exp = TestExpectations(port)
</span><ins>+        exp.parse_all_expectations()
</ins><span class="cx">         _, _, logs = capture.restore_output()
</span><span class="cx">         self.assertEqual('The following test foo/bar/baz.html from the Skipped list doesn\'t exist\n', logs)
</span><span class="cx"> 
</span><span class="lines">@@ -471,6 +474,7 @@
</span><span class="cx"> Bug(y) [ Win Mac Debug ] failures/expected/foo.html [ Crash ]
</span><span class="cx"> &quot;&quot;&quot;}
</span><span class="cx">         expectations = TestExpectations(test_port, self.get_basic_tests())
</span><ins>+        expectations.parse_all_expectations()
</ins><span class="cx"> 
</span><span class="cx">         actual_expectations = expectations.remove_configuration_from_test('failures/expected/foo.html', test_config)
</span><span class="cx"> 
</span><span class="lines">@@ -489,6 +493,7 @@
</span><span class="cx"> Bug(y) [ Win Debug ] failures/expected/foo.html [ Crash ]
</span><span class="cx"> &quot;&quot;&quot;}
</span><span class="cx">         expectations = TestExpectations(test_port)
</span><ins>+        expectations.parse_all_expectations()
</ins><span class="cx"> 
</span><span class="cx">         actual_expectations = expectations.remove_configuration_from_test('failures/expected/foo.html', test_config)
</span><span class="cx">         actual_expectations = expectations.remove_configuration_from_test('failures/expected/foo.html', host.port_factory.get('test-win-vista', None).test_configuration())
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpylayout_testsmodelstest_run_results_unittestpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py (160755 => 160756)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py        2013-12-18 07:37:08 UTC (rev 160755)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py        2013-12-18 11:41:08 UTC (rev 160756)
</span><span class="lines">@@ -50,6 +50,7 @@
</span><span class="cx">     tests = ['passes/text.html', 'failures/expected/timeout.html', 'failures/expected/crash.html', 'failures/expected/hang.html',
</span><span class="cx">              'failures/expected/audio.html']
</span><span class="cx">     expectations = test_expectations.TestExpectations(port, tests)
</span><ins>+    expectations.parse_all_expectations()
</ins><span class="cx">     return test_run_results.TestRunResults(expectations, len(tests))
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolcommandsqueriespy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/commands/queries.py (160755 => 160756)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/commands/queries.py        2013-12-18 07:37:08 UTC (rev 160755)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/queries.py        2013-12-18 11:41:08 UTC (rev 160756)
</span><span class="lines">@@ -524,7 +524,9 @@
</span><span class="cx"> 
</span><span class="cx">     def _model(self, options, port_name, tests):
</span><span class="cx">         port = self._tool.port_factory.get(port_name, options)
</span><del>-        return TestExpectations(port, tests).model()
</del><ins>+        expectations = TestExpectations(port, tests)
+        expectations.parse_all_expectations()
+        return expectations.model()
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> class PrintBaselines(Command):
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolcommandsrebaselinepy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py (160755 => 160756)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py        2013-12-18 07:37:08 UTC (rev 160755)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py        2013-12-18 11:41:08 UTC (rev 160756)
</span><span class="lines">@@ -152,6 +152,7 @@
</span><span class="cx">             lock = self._tool.make_file_lock(path + '.lock')
</span><span class="cx">             lock.acquire_lock()
</span><span class="cx">             expectations = TestExpectations(port, include_generic=False, include_overrides=False)
</span><ins>+            expectations.parse_all_expectations()
</ins><span class="cx">             for test_configuration in port.all_test_configurations():
</span><span class="cx">                 if test_configuration.version == port.test_configuration().version:
</span><span class="cx">                     expectationsString = expectations.remove_configuration_from_test(test_name, test_configuration)
</span><span class="lines">@@ -316,6 +317,7 @@
</span><span class="cx">         port = self._tool.port_factory.get(port_name)
</span><span class="cx"> 
</span><span class="cx">         expectations = TestExpectations(port)
</span><ins>+        expectations.parse_all_expectations()
</ins><span class="cx">         for path in port.expectations_dict():
</span><span class="cx">             if self._tool.filesystem.exists(path):
</span><span class="cx">                 self._tool.filesystem.write_text_file(path, expectations.remove_rebaselined_tests(expectations.get_rebaselining_failures(), path))
</span><span class="lines">@@ -323,6 +325,7 @@
</span><span class="cx">     def _tests_to_rebaseline(self, port):
</span><span class="cx">         tests_to_rebaseline = {}
</span><span class="cx">         expectations = TestExpectations(port, include_overrides=True)
</span><ins>+        expectations.parse_all_expectations()
</ins><span class="cx">         for test in expectations.get_rebaselining_failures():
</span><span class="cx">             tests_to_rebaseline[test] = TestExpectations.suffixes_for_expectations(expectations.model().get_expectations(test))
</span><span class="cx">         return tests_to_rebaseline
</span></span></pre>
</div>
</div>

</body>
</html>