Home | History | Annotate | Download | only in options
      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
      3 // found in the LICENSE file.
      4 
      5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_BROWSERTEST_H_
      6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_BROWSERTEST_H_
      7 
      8 #include "base/basictypes.h"
      9 #include "base/compiler_specific.h"
     10 #include "chrome/test/base/web_ui_browsertest.h"
     11 #include "content/public/browser/web_ui_message_handler.h"
     12 
     13 // This is a helper class used by options_browsertest.js to feed the navigation
     14 // history back to the test.
     15 class OptionsBrowserTest : public WebUIBrowserTest,
     16                            public content::WebUIMessageHandler {
     17  public:
     18   OptionsBrowserTest();
     19   virtual ~OptionsBrowserTest();
     20 
     21  private:
     22   // WebUIMessageHandler implementation.
     23   virtual void RegisterMessages() OVERRIDE;
     24 
     25   // WebUIBrowserTest implementation.
     26   virtual content::WebUIMessageHandler* GetMockMessageHandler() OVERRIDE;
     27 
     28   // A callback for the 'optionsTestReportHistory' message, this sends the
     29   // URLs in the "back" tab history, including the current entry, back to the
     30   // WebUI via a callback.
     31   void ReportHistory(const base::ListValue* list_value);
     32 
     33   DISALLOW_COPY_AND_ASSIGN(OptionsBrowserTest);
     34 };
     35 
     36 #endif  // CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_BROWSERTEST_H_
     37