12a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved.
22a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
32a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// found in the LICENSE file.
42a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
52a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include "base/command_line.h"
62a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include "chrome/browser/extensions/extension_apitest.h"
72a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include "chrome/common/chrome_switches.h"
8116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch#include "extensions/common/switches.h"
92a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
102a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)class ExtensionApiTestWithSwitch : public ExtensionApiTest {
112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) public:
122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)    ExtensionApiTest::SetUpCommandLine(command_line);
142a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)    command_line->AppendSwitch(switches::kSilentDebuggerExtensionAPI);
15116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch    command_line->AppendSwitch(extensions::switches::kExtensionsOnChromeURLs);
162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  }
172a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)};
182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(ExtensionApiTestWithSwitch, ExtensionDebugger) {
202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  ASSERT_TRUE(RunExtensionTest("debugger_extension")) << message_;
212a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
22