Chromium Code Reviews| Index: ash/test/test_metro_viewer_process_host.cc |
| diff --git a/ash/test/test_metro_viewer_process_host.cc b/ash/test/test_metro_viewer_process_host.cc |
| index 052664f2d97a9e4347d0830f3c515820eb773f3e..ebb3e0c292dd4edfea89e2666fbf82dcb9ffcd89 100644 |
| --- a/ash/test/test_metro_viewer_process_host.cc |
| +++ b/ash/test/test_metro_viewer_process_host.cc |
| @@ -61,39 +61,27 @@ void TestMetroViewerProcessHost::NotifyChannelConnected() { |
| channel_connected_event_.Signal(); |
| } |
| -bool TestMetroViewerProcessHost::LaunchImmersiveChromeAndWaitForConnection() { |
| - // Activate metro chrome. NOTE: This assumes a few things: |
| - // 1) That we are using the per-user AppModelId. This is safe for tests. |
| +bool TestMetroViewerProcessHost::LaunchImmersiveChromeAndWaitForConnection( |
| + const string16& app_user_model_id) { |
| + // Activate the viewer process. NOTE: This assumes a few things: |
| + // 1) That the viewer process is registered as the default browser using the |
| + // provided |app_user_model_id|. |
| // |
| - // 2) That Chrome is registered as the default browser using a test AppModelId |
| - // suffix. |
| - // TODO(robertshield,grt): Automate 2). Note that at current, The Way to |
| - // register chrome.exe is to run |
| - // |
| - // setup.exe --register-dev-chrome --register-dev-chrome-suffix=.test |
| - // |
| - // 3) That chrome.exe/delegate_execute.exe are at all suitable for using as |
| - // a metro viewer process for tests. |
| + // 2) That the viewer process has been built. This process is still chrome.exe |
| + // at the moment, so a run-time dependency still exists between this code |
|
grt (UTC plus 2)
2013/02/12 15:37:43
If I understand correctly, this code won't have to
robertshield
2013/02/12 16:57:08
Done.
|
| + // and chrome.exe |
| // TODO(robertshield): Investigate having a minimal non-chrome viewer process. |
| // http://crbug.com/170425 |
| -#if defined(GOOGLE_CHROME_BUILD) |
| - const wchar_t kAppUserModelId[] = L"Chrome"; |
| -#else // GOOGLE_CHROME_BUILD |
| - const wchar_t kAppUserModelId[] = L"Chromium"; |
| -#endif // GOOGLE_CHROME_BUILD |
| // TODO(robertshield): Initialize COM at test suite startup. |
| base::win::ScopedCOMInitializer com_initializer; |
| - string16 app_model_id(kAppUserModelId); |
| - app_model_id.append(L".test"); |
| - |
| base::win::ScopedComPtr<IApplicationActivationManager> activator; |
| HRESULT hr = activator.CreateInstance(CLSID_ApplicationActivationManager); |
| if (SUCCEEDED(hr)) { |
| DWORD pid = 0; |
| hr = activator->ActivateApplication( |
| - app_model_id.c_str(), L"open", AO_NONE, &pid); |
| + app_user_model_id.c_str(), L"open", AO_NONE, &pid); |
| } |
| LOG_IF(ERROR, FAILED(hr)) << "Tried and failed to launch Metro Chrome. " |