| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <string> | 5 #include <string> |
| 6 | 6 |
| 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/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| 11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
| 12 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
| 13 #include "chrome/test/base/in_process_browser_test.h" | 13 #include "chrome/test/base/in_process_browser_test.h" |
| 14 #include "chrome/test/base/ui_test_utils.h" | 14 #include "chrome/test/base/ui_test_utils.h" |
| 15 #include "content/browser/accessibility/browser_accessibility.h" | 15 #include "content/browser/accessibility/browser_accessibility.h" |
| 16 #include "content/browser/accessibility/browser_accessibility_manager.h" | 16 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 17 #include "content/browser/accessibility/dump_accessibility_tree_helper.h" | 17 #include "content/browser/accessibility/dump_accessibility_tree_helper.h" |
| 18 #include "content/browser/renderer_host/render_view_host_impl.h" | 18 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 19 #include "content/public/browser/notification_service.h" | 19 #include "content/public/browser/notification_service.h" |
| 20 #include "content/public/browser/notification_types.h" | 20 #include "content/public/browser/notification_types.h" |
| 21 #include "content/public/browser/render_widget_host_view.h" | 21 #include "content/public/browser/render_widget_host_view.h" |
| 22 #include "content/public/browser/web_contents.h" | 22 #include "content/public/browser/web_contents.h" |
| 23 #include "content/public/common/content_paths.h" | 23 #include "content/public/common/content_paths.h" |
| 24 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
| 25 | 25 |
| 26 using content::OpenURLParams; | 26 using content::OpenURLParams; |
| 27 using content::RenderViewHostImpl; |
| 28 using content::RenderWidgetHostImpl; |
| 29 using content::RenderWidgetHost; |
| 27 using content::Referrer; | 30 using content::Referrer; |
| 28 | 31 |
| 29 namespace { | 32 namespace { |
| 30 // Required to enter html content into a url. | 33 // Required to enter html content into a url. |
| 31 static const std::string kUrlPreamble = "data:text/html,\n<!doctype html>"; | 34 static const std::string kUrlPreamble = "data:text/html,\n<!doctype html>"; |
| 32 } // namespace | 35 } // namespace |
| 33 | 36 |
| 34 // This test takes a snapshot of the platform BrowserAccessibility tree and | 37 // This test takes a snapshot of the platform BrowserAccessibility tree and |
| 35 // tests it against an expected baseline. | 38 // tests it against an expected baseline. |
| 36 // | 39 // |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 116 |
| 114 EXPECT_TRUE(file_util::WriteFile( | 117 EXPECT_TRUE(file_util::WriteFile( |
| 115 actual_file, actual_contents8.c_str(), actual_contents8.size())); | 118 actual_file, actual_contents8.c_str(), actual_contents8.size())); |
| 116 | 119 |
| 117 ADD_FAILURE() << "No expectation found. Create it by doing:\n" | 120 ADD_FAILURE() << "No expectation found. Create it by doing:\n" |
| 118 << "mv " << actual_file.LossyDisplayName() << " " | 121 << "mv " << actual_file.LossyDisplayName() << " " |
| 119 << expected_file.LossyDisplayName(); | 122 << expected_file.LossyDisplayName(); |
| 120 } | 123 } |
| 121 } while (!(html_file = file_enumerator.Next()).empty()); | 124 } while (!(html_file = file_enumerator.Next()).empty()); |
| 122 } | 125 } |
| OLD | NEW |