Commit 913faeac authored by sky's avatar sky Committed by Commit bot

Forces use mesa switch in mash_unittests and views_aura_mus_unittests

This way you can run from the command line and it just works!

BUG=none
TEST=none
R=sadrul@chromium.org

Review-Url: https://codereview.chromium.org/2579863002
Cr-Commit-Position: refs/heads/master@{#438936}
parent f5230da7
......@@ -4,12 +4,14 @@
#include "mash/test/mash_test_suite.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/path_service.h"
#include "ui/aura/env.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
#include "ui/compositor/test/context_factories_for_test.h"
#include "ui/gl/gl_switches.h"
#include "ui/gl/test/gl_surface_test_support.h"
namespace mash {
......@@ -22,6 +24,9 @@ MashTestSuite::~MashTestSuite() {}
void MashTestSuite::Initialize() {
base::TestSuite::Initialize();
base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kOverrideUseGLWithOSMesaForTests);
// Load ash mus strings and resources; not 'common' (Chrome) resources.
base::FilePath resources;
PathService::Get(base::DIR_MODULE, &resources);
......
......@@ -228,9 +228,6 @@
"test": "jingle_unittests"
},
{
"args": [
"--override-use-gl-with-osmesa-for-tests"
],
"swarming": {
"can_use_on_swarming_builders": true
},
......@@ -405,9 +402,6 @@
"test": "url_unittests"
},
{
"args": [
"--override-use-gl-with-osmesa-for-tests"
],
"swarming": {
"can_use_on_swarming_builders": false
},
......
......@@ -22,6 +22,7 @@
#include "ui/aura/mus/window_tree_host_mus.h"
#include "ui/aura/test/env_test_helper.h"
#include "ui/aura/window.h"
#include "ui/gl/gl_switches.h"
#include "ui/views/mus/desktop_window_tree_host_mus.h"
#include "ui/views/mus/mus_client.h"
#include "ui/views/mus/test_utils.h"
......@@ -199,6 +200,8 @@ void ViewsAuraMusTestSuite::Initialize() {
// setup for tests (e.g. to unlock the screen in the window manager).
EnsureCommandLineSwitch(ui::switches::kUseTestConfig);
EnsureCommandLineSwitch(switches::kOverrideUseGLWithOSMesaForTests);
ViewsTestSuite::Initialize();
service_manager_connections_ = base::MakeUnique<ServiceManagerConnection>();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment