| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "chrome/common/chrome_paths.h" | 11 #include "chrome/common/chrome_paths.h" |
| 12 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
| 13 #include "chrome/common/json_value_serializer.h" | 13 #include "chrome/common/json_value_serializer.h" |
| 14 #include "chrome/test/automation/tab_proxy.h" | 14 #include "chrome/test/automation/tab_proxy.h" |
| 15 #include "chrome/test/ui/ui_test.h" | 15 #include "chrome/test/ui/ui_test.h" |
| 16 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
| 17 #include "net/base/net_util.h" | 17 #include "net/base/net_util.h" |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 static const FilePath::CharType kBaseUrl[] = | 21 static const FilePath::CharType kBaseUrl[] = |
| 22 FILE_PATH_LITERAL("http://localhost:8000/"); | 22 FILE_PATH_LITERAL("http://localhost:8000/"); |
| 23 | 23 |
| 24 static const FilePath::CharType kTestDirectory[] = | 24 static const FilePath::CharType kTestDirectory[] = |
| 25 FILE_PATH_LITERAL("dom_checker/"); | 25 FILE_PATH_LITERAL("dom_checker/"); |
| 26 | 26 |
| 27 static const FilePath::CharType kStartFile[] = | 27 static const FilePath::CharType kStartFile[] = |
| 28 FILE_PATH_LITERAL("dom_checker.html"); | 28 FILE_PATH_LITERAL("dom_checker.html"); |
| 29 | 29 |
| 30 const wchar_t kRunDomCheckerTest[] = L"run-dom-checker-test"; | 30 const char kRunDomCheckerTest[] = "run-dom-checker-test"; |
| 31 | 31 |
| 32 class DomCheckerTest : public UITest { | 32 class DomCheckerTest : public UITest { |
| 33 public: | 33 public: |
| 34 typedef std::list<std::string> ResultsList; | 34 typedef std::list<std::string> ResultsList; |
| 35 typedef std::set<std::string> ResultsSet; | 35 typedef std::set<std::string> ResultsSet; |
| 36 | 36 |
| 37 DomCheckerTest() { | 37 DomCheckerTest() { |
| 38 dom_automation_enabled_ = true; | 38 dom_automation_enabled_ = true; |
| 39 enable_file_cookies_ = false; | 39 enable_file_cookies_ = false; |
| 40 show_window_ = true; | 40 show_window_ = true; |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 TEST_F(DomCheckerTest, DISABLED_Http) { | 228 TEST_F(DomCheckerTest, DISABLED_Http) { |
| 229 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunDomCheckerTest)) | 229 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunDomCheckerTest)) |
| 230 return; | 230 return; |
| 231 | 231 |
| 232 ResultsList new_passes, new_failures; | 232 ResultsList new_passes, new_failures; |
| 233 RunTest(true, &new_passes, &new_failures); | 233 RunTest(true, &new_passes, &new_failures); |
| 234 PrintResults(new_passes, new_failures); | 234 PrintResults(new_passes, new_failures); |
| 235 } | 235 } |
| 236 | 236 |
| 237 } // namespace | 237 } // namespace |
| OLD | NEW |