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

Side by Side Diff: components/dom_distiller/content/browser/test/dom_distiller_js_browsertest.cc

Issue 1532453002: Run all the tests in DomDistillerJsTest.RunJsTests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address mdjones' comments Created 5 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 const char* kTestFilePath = "/war/test.html?console_log=0";
52 const char* kTestFilePath =
53 "/war/test.html?console_log=0&filter=-*.SchemaOrgParserAccessorTest.*";
54 const char* kRunJsTestsJs = 52 const char* kRunJsTestsJs =
55 "(function() {return org.chromium.distiller.JsTestEntry.run();})();"; 53 "(function() {return org.chromium.distiller.JsTestEntry.run();})();";
56 54
57 class DomDistillerJsTest : public content::ContentBrowserTest { 55 class DomDistillerJsTest : public content::ContentBrowserTest {
58 public: 56 public:
59 DomDistillerJsTest() : result_(NULL) {} 57 DomDistillerJsTest() : result_(NULL) {}
60 58
61 // content::ContentBrowserTest: 59 // content::ContentBrowserTest:
62 void SetUpOnMainThread() override { 60 void SetUpOnMainThread() override {
63 AddComponentsResources(); 61 AddComponentsResources();
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // Only print the log if there was an error. 157 // Only print the log if there was an error.
160 if (!success) { 158 if (!success) {
161 ASSERT_TRUE(dict->HasKey("log")); 159 ASSERT_TRUE(dict->HasKey("log"));
162 std::string console_log; 160 std::string console_log;
163 ASSERT_TRUE(dict->GetString("log", &console_log)); 161 ASSERT_TRUE(dict->GetString("log", &console_log));
164 VLOG(0) << "Console log:\n" << console_log; 162 VLOG(0) << "Console log:\n" << console_log;
165 } 163 }
166 } 164 }
167 165
168 } // namespace dom_distiller 166 } // namespace dom_distiller
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698