Linux: Depend on liberation-fonts package for RPMs.
[chromium-blink-merge.git] / chrome / test / data / webui / async_gen.h
blobf2b05de179e2f7449eda3775310dc7f6b78f303f
1 // Copyright (c) 2011 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 #ifndef CHROME_TEST_DATA_WEBUI_ASYNC_GEN_H_
5 #define CHROME_TEST_DATA_WEBUI_ASYNC_GEN_H_
7 #include "chrome/test/base/web_ui_browser_test.h"
8 #include "content/public/browser/web_ui_message_handler.h"
9 #include "testing/gmock/include/gmock/gmock.h"
11 namespace base {
12 class ListValue;
13 } // namespace base
15 // C++ support class for javascript-generated asynchronous tests.
16 class WebUIBrowserAsyncGenTest : public WebUIBrowserTest {
17 public:
18 WebUIBrowserAsyncGenTest();
19 ~WebUIBrowserAsyncGenTest() override;
21 protected:
22 class AsyncWebUIMessageHandler : public content::WebUIMessageHandler {
23 public:
24 AsyncWebUIMessageHandler();
25 ~AsyncWebUIMessageHandler();
27 MOCK_METHOD1(HandleTearDown, void(const base::ListValue*));
29 private:
30 void HandleCallJS(const base::ListValue* list_value);
32 // WebUIMessageHandler implementation.
33 void RegisterMessages() override;
36 // Handler for this test fixture.
37 ::testing::StrictMock<AsyncWebUIMessageHandler> message_handler_;
39 private:
40 // Provide this object's handler.
41 content::WebUIMessageHandler* GetMockMessageHandler() override {
42 return &message_handler_;
45 void SetUpOnMainThread() override {
46 WebUIBrowserTest::SetUpOnMainThread();
47 EXPECT_CALL(message_handler_, HandleTearDown(::testing::_));
50 DISALLOW_COPY_AND_ASSIGN(WebUIBrowserAsyncGenTest);
53 #endif // CHROME_TEST_DATA_WEBUI_ASYNC_GEN_H_