OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/callback.h" | 5 #include "base/callback.h" |
6 #include "base/location.h" | 6 #include "base/location.h" |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 30 matching lines...) Expand all Loading... | |
41 private: | 41 private: |
42 base::Closure callback_; | 42 base::Closure callback_; |
43 }; | 43 }; |
44 | 44 |
45 } // namespace | 45 } // namespace |
46 | 46 |
47 namespace dom_distiller { | 47 namespace dom_distiller { |
48 | 48 |
49 const char* kExternalTestResourcesPath = | 49 const char* kExternalTestResourcesPath = |
50 "third_party/dom_distiller_js/dist/test/data"; | 50 "third_party/dom_distiller_js/dist/test/data"; |
51 // TODO(wychen) Remove filter when crbug.com/471854 is fixed. | 51 // TODO(wychen) Remove filter when crbug.com/471854 is fixed. |
mdjones
2015/12/16 00:22:38
Remove todo?
wychen
2015/12/16 00:54:00
Done.
| |
52 const char* kTestFilePath = | 52 const char* kTestFilePath = |
53 "/war/test.html?console_log=0&filter=-*.SchemaOrgParserAccessorTest.*"; | 53 "/war/test.html?console_log=0"; |
mdjones
2015/12/16 00:22:39
I think this fits on the line above.
wychen
2015/12/16 00:54:00
Done.
| |
54 const char* kRunJsTestsJs = | 54 const char* kRunJsTestsJs = |
55 "(function() {return org.chromium.distiller.JsTestEntry.run();})();"; | 55 "(function() {return org.chromium.distiller.JsTestEntry.run();})();"; |
56 | 56 |
57 class DomDistillerJsTest : public content::ContentBrowserTest { | 57 class DomDistillerJsTest : public content::ContentBrowserTest { |
58 public: | 58 public: |
59 DomDistillerJsTest() : result_(NULL) {} | 59 DomDistillerJsTest() : result_(NULL) {} |
60 | 60 |
61 // content::ContentBrowserTest: | 61 // content::ContentBrowserTest: |
62 void SetUpOnMainThread() override { | 62 void SetUpOnMainThread() override { |
63 AddComponentsResources(); | 63 AddComponentsResources(); |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
159 // Only print the log if there was an error. | 159 // Only print the log if there was an error. |
160 if (!success) { | 160 if (!success) { |
161 ASSERT_TRUE(dict->HasKey("log")); | 161 ASSERT_TRUE(dict->HasKey("log")); |
162 std::string console_log; | 162 std::string console_log; |
163 ASSERT_TRUE(dict->GetString("log", &console_log)); | 163 ASSERT_TRUE(dict->GetString("log", &console_log)); |
164 VLOG(0) << "Console log:\n" << console_log; | 164 VLOG(0) << "Console log:\n" << console_log; |
165 } | 165 } |
166 } | 166 } |
167 | 167 |
168 } // namespace dom_distiller | 168 } // namespace dom_distiller |
OLD | NEW |