blob: 11e1c9875f4a9927dbab8a4e402237d85d464b30 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
// Copyright 2008, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/test/ui/npapi_test_helper.h"
#include "chrome/common/chrome_switches.h"
NPAPITester::NPAPITester()
: UITest() {
}
void NPAPITester::SetUp() {
// We need to copy our test-plugin into the plugins directory so that
// the browser can load it.
std::wstring plugins_directory = browser_directory_.ToWStringHack() +
L"\\plugins";
std::wstring plugin_src = browser_directory_.ToWStringHack() +
L"\\npapi_test_plugin.dll";
plugin_dll_ = plugins_directory + L"\\npapi_test_plugin.dll";
CreateDirectory(plugins_directory.c_str(), NULL);
CopyFile(plugin_src.c_str(), plugin_dll_.c_str(), FALSE);
UITest::SetUp();
}
void NPAPITester::TearDown() {
DeleteFile(plugin_dll_.c_str());
UITest::TearDown();
}
// NPAPIVisiblePluginTester members.
void NPAPIVisiblePluginTester::SetUp() {
show_window_ = true;
NPAPITester::SetUp();
}
// NPAPIIncognitoTester members.
void NPAPIIncognitoTester::SetUp() {
launch_arguments_.AppendSwitch(switches::kIncognito);
NPAPITester::SetUp();
}
|