| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_MEDIA_MEDIA_BROWSERTEST_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_MEDIA_BROWSERTEST_H_ |
| 6 #define CHROME_BROWSER_MEDIA_MEDIA_BROWSERTEST_H_ | 6 #define CHROME_BROWSER_MEDIA_MEDIA_BROWSERTEST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chrome/test/base/in_process_browser_test.h" | 10 #include "chrome/test/base/in_process_browser_test.h" |
| 11 #include "content/public/browser/web_contents_observer.h" | 11 #include "content/public/browser/web_contents_observer.h" |
| 12 #include "media/base/test_data_util.h" | 12 #include "media/base/test_data_util.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 class TitleWatcher; | 15 class TitleWatcher; |
| 16 } | 16 } |
| 17 | 17 |
| 18 // Class used to automate running media related browser tests. The functions | 18 // Class used to automate running media related browser tests. The functions |
| 19 // assume that media files are located under files/media/ folder known to | 19 // assume that media files are located under media/ folder known to the test |
| 20 // the test http server. | 20 // http server. |
| 21 class MediaBrowserTest : public InProcessBrowserTest, | 21 class MediaBrowserTest : public InProcessBrowserTest, |
| 22 public content::WebContentsObserver { | 22 public content::WebContentsObserver { |
| 23 protected: | 23 protected: |
| 24 // Common test results. | 24 // Common test results. |
| 25 static const char kEnded[]; | 25 static const char kEnded[]; |
| 26 // TODO(xhwang): Report detailed errors, e.g. "ERROR-3". | 26 // TODO(xhwang): Report detailed errors, e.g. "ERROR-3". |
| 27 static const char kError[]; | 27 static const char kError[]; |
| 28 static const char kFailed[]; | 28 static const char kFailed[]; |
| 29 | 29 |
| 30 MediaBrowserTest(); | 30 MediaBrowserTest(); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 51 base::ProcessId plugin_pid) override; | 51 base::ProcessId plugin_pid) override; |
| 52 | 52 |
| 53 // When called, the test will ignore any plugin crashes and not fail the test. | 53 // When called, the test will ignore any plugin crashes and not fail the test. |
| 54 void IgnorePluginCrash(); | 54 void IgnorePluginCrash(); |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 bool ignore_plugin_crash_; | 57 bool ignore_plugin_crash_; |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 #endif // CHROME_BROWSER_MEDIA_MEDIA_BROWSERTEST_H_ | 60 #endif // CHROME_BROWSER_MEDIA_MEDIA_BROWSERTEST_H_ |
| OLD | NEW |