New issue
Advanced search Search tips

Issue 899055 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 8
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

LockScreenNoteTakingTest.Launch fails under SingleProcessMash

Project Member Reported by jamescook@chromium.org, Oct 25

Issue description

Fails in the JS layer.

[62009:62009:1025/141038.309864:INFO:CONSOLE(0)] "[SUCCESS] noAccessToIdentity", source: chrome-extension://cadfeochfldmbdgoccgbeianhamecbae/test.html (0)
[62009:62009:1025/141038.314161:INFO:CONSOLE(0)] "[FAIL] hasAccessToCurrentWindow: FAIL (no message)
Error
    at extensions::test:168:18
    at extensions::test:152:16
    at hasAccessToCurrentWindow (chrome-extension://cadfeochfldmbdgoccgbeianhamecbae/test.js:14:17)
    at extensions::test:110:19", source: chrome-extension://cadfeochfldmbdgoccgbeianhamecbae/test.html (0)
[62009:62009:1025/141038.321833:INFO:CONSOLE(0)] "[SUCCESS] cannotCreateSecondWindow", source: chrome-extension://cadfeochfldmbdgoccgbeianhamecbae/test.html (0)
[62009:62009:1025/141038.322999:INFO:CONSOLE(0)] "[SUCCESS] reportReadyToClose", source: chrome-extension://cadfeochfldmbdgoccgbeianhamecbae/test.html (0)
../../chrome/browser/chromeos/lock_screen_apps/note_taking_browsertest.cc:171: Failure
Value of: RunTestAppInLockScreenContext("lock_screen_apps/app_launch", &error_message)
  Actual: false
Expected: true
Failed 1 of 4 tests
Stack trace:
#0 0x0000023bb19c testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop()
#1 0x0000023bab69 testing::internal::AssertHelper::operator=()
#2 0x00000194f46c LockScreenNoteTakingTest_Launch_Test::RunTestOnMainThread()
#3 0x000003592842 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop()
#4 0x00000302f798 ChromeBrowserMainParts::PreMainMessageLoopRunImpl()
#5 0x00000302e4e5 ChromeBrowserMainParts::PreMainMessageLoopRun()
#6 0x000001fb6cd7 chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun()
#7 0x7f92ce22680a content::BrowserMainLoop::PreMainMessageLoopRun()
#8 0x7f92ce718b35 content::StartupTaskRunner::RunAllTasksNow()
#9 0x7f92ce225371 content::BrowserMainLoop::CreateStartupTasks()
#10 0x7f92ce228ed0 content::BrowserMainRunnerImpl::Initialize()
#11 0x7f92ce222f22 content::BrowserMain()
#12 0x7f92cece364e content::ContentMainRunnerImpl::Run()
#13 0x7f92c2f21dd5 service_manager::Main()
#14 0x7f92cece1994 content::ContentMain()
#15 0x00000359240b content::BrowserTestBase::SetUp()
#16 0x000002fd3d4b InProcessBrowserTest::SetUp()

 
Cc: tbarzic@chromium.org est...@chromium.org
estade, have you seen any cases where ChromeNativeAppWindowAuraAsh doesn't correctly tell the app about it's window show state?

The failing line is a JS-side assertion:
chrome.test.assertTrue(chrome.app.window.current().isMaximized());

https://cs.chromium.org/chromium/src/chrome/test/data/extensions/lock_screen_apps/app_launch/test.js?rcl=9671ca76f6384ac817daf6861dc759dfc3135b27&l=14

It looks like NativeAppWindow "pushes" the window maximize state to the renderer so that the app can query it's own window state.

Logging shows AppWindowContents NativeWindowChanged being called with maximized = true in classic ash, but maximized = false with --enable-features=SingleProcessMash.

Lock screen apps are unusual in that code in //ash sets the show state:
https://cs.chromium.org/chromium/src/ash/wm/lock_action_handler_layout_manager.cc?rcl=9671ca76f6384ac817daf6861dc759dfc3135b27&l=60

But I would expect the browser to notice that and eventually mirror the maximized state to the renderer.

Cc: sky@chromium.org
OK had a look at this today. I can get the test to pass with the following hack: remove this entire stanza[1] and unconditionally call window->SetPropertyFromServer().

What I think is happening is that when we create the toplevel, NativeWidgetAura inits the kShowStateKey from the InitParams.[2] Then immediately afterwards LockWindowState sets kShowStateKey as well.[3] Then in OnTopLevelCreated the first change, still in flight, is given precedence over the second change. I'm not sure what to do about it, maybe Scott can weigh in.

[1] https://cs.chromium.org/chromium/src/ui/aura/mus/window_tree_client.cc?sq=package:chromium&g=0&l=1100-1106

[2] https://cs.chromium.org/chromium/src/ui/views/widget/native_widget_aura.cc?rcl=41463733b6ebbdee9549063eb9d9e23278ff7c1b&l=166

#3 0x7fd5e3d0490a ui::PropertyHandler::SetProperty<>()
#4 0x7fd5e799721e views::NativeWidgetAura::InitNativeWidget()
#5 0x7fd5e7978c6b views::Widget::Init()
#6 0x7fd5e24d6908 ash::NonClientFrameController::NonClientFrameController()
#7 0x7fd5e2506b1d ash::CreateAndParentTopLevelWindow()
#8 0x7fd5e2521224 ash::WindowServiceDelegateImpl::NewTopLevel()
#9 0x7fd5e1aa36da ws::WindowTree::NewTopLevelWindow()

[3] #1 0x7fd5e2511443 ash::wm::WindowState::UpdateWindowPropertiesFromStateType()
#2 0x7fd5e24d47b0 ash::LockWindowState::UpdateWindow()
#3 0x7fd5e25109d1 ash::wm::WindowState::SetStateObject()
#4 0x7fd5e24d4a5b ash::LockWindowState::SetLockWindowStateWithShelfExcluded()
#5 0x7fd5e24d1883 ash::LockActionHandlerLayoutManager::OnWindowAddedToLayout()
#6 0x7fd5e3d37ffc aura::Window::AddChild()
#7 0x7fd5e79972fb views::NativeWidgetAura::InitNativeWidget()
#8 0x7fd5e7978c6b views::Widget::Init()
#9 0x7fd5e24d6908 ash::NonClientFrameController::NonClientFrameController()
#10 0x7fd5e2506b1d ash::CreateAndParentTopLevelWindow()
#11 0x7fd5e2521224 ash::WindowServiceDelegateImpl::NewTopLevel()
#12 0x7fd5e1aa36da ws::WindowTree::NewTopLevelWindow()
James and myself discussed a possible fix to this on Friday. Don't set the show state property if the value is DEFAULT in DesktopWindowTreeHostMus::Show(). I believe James is still investigating.
Oops, I should have posted something on the bug. sky and I think we know what the problem is. Yes, the window server in ash sets "maximized" on the lock window when it is added to the lock container, via the lock manager. Then the client (chrome) stomps the kShowState, we think from here:

https://cs.chromium.org/chromium/src/ui/views/mus/desktop_window_tree_host_mus.cc?rcl=250c2b16eeca3c33be5a8bfe5d60411d2e605bb7&l=329

It overwrites it back to 0 aka SHOW_STATE_DEFAULT.

I have a patch that fixes it and I'm looking into tests today.

Sorry if you spent a lot of time on this.

no worries, I will learn something from the outcome.
Project Member

Comment 6 by bugdroid1@chromium.org, Nov 1

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/76f7d242a2e9cabdb0b2da856933093c1d461ac2

commit 76f7d242a2e9cabdb0b2da856933093c1d461ac2
Author: James Cook <jamescook@chromium.org>
Date: Thu Nov 01 05:10:15 2018

Let ash provide window show state if client has SHOW_STATE_DEFAULT

For lock screen app windows the window manager needs to specify the
initial show state of the window. Ensure the client (chrome) does not
overwrite the aura window show-state property in ash if the client
window has ui::SHOW_STATE_DEFAULT.

Fixes LockScreenNoteTakingTest.Launch pass under SingleProcessMash

Bug:  899055 
Test: added to views_mus_unittests

Change-Id: Ib7b6f9a060835ebf3e017737e4b98387a31831c8
Reviewed-on: https://chromium-review.googlesource.com/c/1303273
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Toni Baržić <tbarzic@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604517}
[modify] https://crrev.com/76f7d242a2e9cabdb0b2da856933093c1d461ac2/chrome/browser/chromeos/lock_screen_apps/note_taking_browsertest.cc
[modify] https://crrev.com/76f7d242a2e9cabdb0b2da856933093c1d461ac2/chrome/browser/chromeos/lock_screen_apps/state_controller.h
[modify] https://crrev.com/76f7d242a2e9cabdb0b2da856933093c1d461ac2/chrome/test/data/extensions/lock_screen_apps/app_launch/test.js
[modify] https://crrev.com/76f7d242a2e9cabdb0b2da856933093c1d461ac2/services/ws/test_ws/test_window_service.cc
[modify] https://crrev.com/76f7d242a2e9cabdb0b2da856933093c1d461ac2/services/ws/test_ws/test_window_service.h
[modify] https://crrev.com/76f7d242a2e9cabdb0b2da856933093c1d461ac2/services/ws/test_ws/test_ws.mojom
[modify] https://crrev.com/76f7d242a2e9cabdb0b2da856933093c1d461ac2/testing/buildbot/filters/chromeos.mash.fyi.browser_tests.filter
[modify] https://crrev.com/76f7d242a2e9cabdb0b2da856933093c1d461ac2/testing/buildbot/filters/chromeos.single_process_mash.browser_tests.filter
[modify] https://crrev.com/76f7d242a2e9cabdb0b2da856933093c1d461ac2/ui/base/class_property.cc
[modify] https://crrev.com/76f7d242a2e9cabdb0b2da856933093c1d461ac2/ui/views/mus/BUILD.gn
[modify] https://crrev.com/76f7d242a2e9cabdb0b2da856933093c1d461ac2/ui/views/mus/desktop_window_tree_host_mus.cc
[modify] https://crrev.com/76f7d242a2e9cabdb0b2da856933093c1d461ac2/ui/views/mus/desktop_window_tree_host_mus_unittest.cc

Fails on MSan. Seems like an aura::Window is destroyed before FirstAppRunToastManager's ScopedObsever to remove it.

https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Linux%20ChromiumOS%20MSan%20Tests/9381

==12554==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x55c4b3c2a8e5 in find_if<std::__1::__wrap_iter<const base::internal::UncheckedObserverAdapter *>, (lambda at ../../base/observer_list.h:303:25)> ./../../buildtools/third_party/libc++/trunk/include/algorithm:877:5
    #1 0x55c4b3c2a8e5 in HasObserver ./../../base/observer_list.h:302:0
    #2 0x55c4b3c2a8e5 in aura::Window::HasObserver(aura::WindowObserver const*) const ./../../ui/aura/window.cc:563:0
    #3 0x55c4b3c625b5 in aura::WindowObserver::OnUnobservingWindow(aura::Window*) ./../../ui/aura/window_observer.cc:25:15
    #4 0x55c4b3c187ba in aura::Window::RemoveObserver(aura::WindowObserver*) ./../../ui/aura/window.cc:558:13
    #5 0x55c49c2c3fec in RemoveAll ./../../base/scoped_observer.h:45:20
    #6 0x55c49c2c3fec in lock_screen_apps::FirstAppRunToastManager::Reset() ./../../chrome/browser/chromeos/lock_screen_apps/first_app_run_toast_manager.cc:73:0
    #7 0x55c49c2d40f6 in lock_screen_apps::StateController::ResetNoteTakingWindowAndMoveToNextState(bool, ash::mojom::CloseLockScreenNoteReason) ./../../chrome/browser/chromeos/lock_screen_apps/state_controller.cc:499:35
    #8 0x55c4a37a20ae in extensions::AppWindowRegistry::RemoveAppWindow(extensions::AppWindow*) ./../../extensions/browser/app_window/app_window_registry.cc:85:14
    #9 0x55c4a3782590 in extensions::AppWindow::OnNativeClose() ./../../extensions/browser/app_window/app_window.cc:493:45
    #10 0x55c4ae3c5345 in views::Widget::OnNativeWidgetDestroyed() ./../../ui/views/widget/widget.cc:1111:21
    #11 0x55c4c4ac734e in views::DesktopNativeWidgetAura::OnHostClosed() ./../../ui/views/widget/desktop_aura/desktop_native_widget_aura.cc:330:28
    #12 0x55c4b66a05a3 in views::DesktopWindowTreeHostMus::CloseNow() ./../../ui/views/mus/desktop_window_tree_host_mus.cc:571:32
    #13 0x55c4aa69f49a in Run ./../../base/callback.h:99:12
    #14 0x55c4aa69f49a in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) ./../../base/debug/task_annotator.cc:99:0
    #15 0x55c4aa364842 in base::MessageLoop::RunTask(base::PendingTask*) ./../../base/message_loop/message_loop.cc:545:46
    #16 0x55c4aa365abd in DeferOrRunPendingTask ./../../base/message_loop/message_loop.cc:556:5
    #17 0x55c4aa365abd in base::MessageLoop::DoWork() ./../../base/message_loop/message_loop.cc:628:0
    #18 0x55c4aa68b780 in base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) ./../../base/message_loop/message_pump_libevent.cc:210:31
    #19 0x55c4aa42ef1f in base::RunLoop::Run() ./../../base/run_loop.cc:102:14
    #20 0x55c4ac46c8e4 in content::RunThisRunLoop(base::RunLoop*) ./../../content/public/test/test_utils.cc:130:13
    #21 0x55c4c402e937 in extensions::ResultCatcher::GetNextResult() ./../../extensions/test/result_catcher.cc:35:5
    #22 0x55c49a626ad7 in (anonymous namespace)::LockScreenNoteTakingTest::RunTestAppInLockScreenContext(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) ./../../chrome/browser/chromeos/lock_screen_apps/note_taking_browsertest.cc:169:18
    #23 0x55c49a624ea9 in LockScreenNoteTakingTest_Launch_Test::RunTestOnMainThread() ./../../chrome/browser/chromeos/lock_screen_apps/note_taking_browsertest.cc:187:3
    #24 0x55c4ac3a916b in content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() ./../../content/public/test/browser_test_base.cc:422:5
    #25 0x55c4aaa428d5 in Run ./../../base/callback.h:129:12
    #26 0x55c4aaa428d5 in ChromeBrowserMainParts::PreMainMessageLoopRunImpl() ./../../chrome/browser/chrome_browser_main.cc:1844:0
    #27 0x55c4aaa3df3f in ChromeBrowserMainParts::PreMainMessageLoopRun() ./../../chrome/browser/chrome_browser_main.cc:1228:18
    #28 0x55c49be94c34 in chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() ./../../chrome/browser/chromeos/chrome_browser_main_chromeos.cc:661:32
    #29 0x55c4a14cf634 in content::BrowserMainLoop::PreMainMessageLoopRun() ./../../content/browser/browser_main_loop.cc:977:13
    #30 0x55c4a2c9a05c in Run ./../../base/callback.h:129:12
    #31 0x55c4a2c9a05c in content::StartupTaskRunner::RunAllTasksNow() ./../../content/browser/startup_task_runner.cc:41:0
    #32 0x55c4a14c7c7a in content::BrowserMainLoop::CreateStartupTasks() ./../../content/browser/browser_main_loop.cc:911:25
    #33 0x55c4a14db952 in content::BrowserMainRunnerImpl::Initialize(content::MainFunctionParams const&) ./../../content/browser/browser_main_runner_impl.cc:144:15
    #34 0x55c4a14bbf82 in content::BrowserMain(content::MainFunctionParams const&) ./../../content/browser/browser_main.cc:43:32
    #35 0x55c4a8f3019a in RunBrowserProcessMain ./../../content/app/content_main_runner_impl.cc:537:10
    #36 0x55c4a8f3019a in content::ContentMainRunnerImpl::Run(bool) ./../../content/app/content_main_runner_impl.cc:902:0
    #37 0x55c4b488443e in service_manager::Main(service_manager::MainParams const&) ./../../services/service_manager/embedder/main.cc:472:29
    #38 0x55c4a8f2727e in content::ContentMain(content::ContentMainParams const&) ./../../content/app/content_main.cc:19:10
    #39 0x55c4ac3a7632 in content::BrowserTestBase::SetUp() ./../../content/public/test/browser_test_base.cc:335:3
    #40 0x55c4aa86cc06 in InProcessBrowserTest::SetUp() ./../../chrome/test/base/in_process_browser_test.cc:283:20
    #41 0x55c49d774925 in HandleExceptionsInMethodIfSupported<testing::Test, void> ./../../third_party/googletest/src/googletest/src/gtest.cc:0:0
    #42 0x55c49d774925 in testing::Test::Run() ./../../third_party/googletest/src/googletest/src/gtest.cc:2518:0
    #43 0x55c49d7789bb in testing::TestInfo::Run() ./../../third_party/googletest/src/googletest/src/gtest.cc:2698:11
    #44 0x55c49d77a4a9 in testing::TestCase::Run() ./../../third_party/googletest/src/googletest/src/gtest.cc:2816:28
    #45 0x55c49d7b3564 in testing::internal::UnitTestImpl::RunAllTests() ./../../third_party/googletest/src/googletest/src/gtest.cc:5182:43
    #46 0x55c49d7b1e37 in HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> ./../../third_party/googletest/src/googletest/src/gtest.cc:0:0
    #47 0x55c49d7b1e37 in testing::UnitTest::Run() ./../../third_party/googletest/src/googletest/src/gtest.cc:4791:0
    #48 0x55c4aa8e5d00 in RUN_ALL_TESTS ./../../third_party/googletest/src/googletest/include/gtest/gtest.h:2333:46
    #49 0x55c4aa8e5d00 in base::TestSuite::Run() ./../../base/test/test_suite.cc:294:0
    #50 0x55c4aa28ba4c in ChromeTestSuiteRunner::RunTestSuite(int, char**) ./../../chrome/test/base/chrome_test_launcher.cc:71:21
    #51 0x55c4ac45cc45 in content::LaunchTests(content::TestLauncherDelegate*, unsigned long, int, char**) ./../../content/public/test/test_launcher.cc:647:31
    #52 0x55c4aa28d195 in LaunchChromeTests(unsigned long, content::TestLauncherDelegate*, int, char**) ./../../chrome/test/base/chrome_test_launcher.cc:182:10
    #53 0x55c4aa28b800 in main ./../../chrome/test/base/browser_tests_main_chromeos.cc:21:10
    #54 0x7f4a0dea0f44 in __libc_start_main ??:0:0
    #55 0x55c494988c49 in _start ??:0:0

  Uninitialized value was created by a heap deallocation
    #0 0x55c4949fc8b9 in operator delete(void*) /b/swarming/w/ir/kitchen-workdir/src/third_party/llvm/compiler-rt/lib/msan/msan_new_delete.cc:75:44
    #1 0x55c4b3c15673 in RemoveOrDestroyChildren ./../../ui/aura/window.cc:802:7
    #2 0x55c4b3c15673 in aura::Window::~Window() ./../../ui/aura/window.cc:131:0
    #3 0x55c4b3c1a05c in aura::Window::~Window() ./../../ui/aura/window.cc:94:19
    #4 0x55c4b3c881c4 in aura::WindowTreeHost::DestroyDispatcher() ./../../ui/aura/window_tree_host.cc:317:3
    #5 0x55c4b3c10bcc in aura::WindowTreeHostMus::~WindowTreeHostMus() ./../../ui/aura/mus/window_tree_host_mus.cc:100:3
    #6 0x55c4b669c8a3 in views::DesktopWindowTreeHostMus::~DesktopWindowTreeHostMus() ./../../ui/views/mus/desktop_window_tree_host_mus.cc:351:1
    #7 0x55c4b669ccf3 in ~DesktopWindowTreeHostMus ./../../ui/views/mus/desktop_window_tree_host_mus.cc:341:55
    #8 0x55c4b669ccf3 in non-virtual thunk to views::DesktopWindowTreeHostMus::~DesktopWindowTreeHostMus() ./../../ui/views/mus/desktop_window_tree_host_mus.cc:0:0
    #9 0x55c4c4ac7292 in operator() ./../../buildtools/third_party/libc++/trunk/include/memory:2325:5
    #10 0x55c4c4ac7292 in reset ./../../buildtools/third_party/libc++/trunk/include/memory:2638:0
    #11 0x55c4c4ac7292 in views::DesktopNativeWidgetAura::OnHostClosed() ./../../ui/views/widget/desktop_aura/desktop_native_widget_aura.cc:321:0
    #12 0x55c4b66a05a3 in views::DesktopWindowTreeHostMus::CloseNow() ./../../ui/views/mus/desktop_window_tree_host_mus.cc:571:32
    #13 0x55c4aa69f49a in Run ./../../base/callback.h:99:12
    #14 0x55c4aa69f49a in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) ./../../base/debug/task_annotator.cc:99:0
    #15 0x55c4aa364842 in base::MessageLoop::RunTask(base::PendingTask*) ./../../base/message_loop/message_loop.cc:545:46
    #16 0x55c4aa365abd in DeferOrRunPendingTask ./../../base/message_loop/message_loop.cc:556:5
    #17 0x55c4aa365abd in base::MessageLoop::DoWork() ./../../base/message_loop/message_loop.cc:628:0
    #18 0x55c4aa68b780 in base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) ./../../base/message_loop/message_pump_libevent.cc:210:31
    #19 0x55c4aa42ef1f in base::RunLoop::Run() ./../../base/run_loop.cc:102:14
    #20 0x55c4ac46c8e4 in content::RunThisRunLoop(base::RunLoop*) ./../../content/public/test/test_utils.cc:130:13
    #21 0x55c4c402e937 in extensions::ResultCatcher::GetNextResult() ./../../extensions/test/result_catcher.cc:35:5
    #22 0x55c49a626ad7 in (anonymous namespace)::LockScreenNoteTakingTest::RunTestAppInLockScreenContext(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) ./../../chrome/browser/chromeos/lock_screen_apps/note_taking_browsertest.cc:169:18
    #23 0x55c49a624ea9 in LockScreenNoteTakingTest_Launch_Test::RunTestOnMainThread() ./../../chrome/browser/chromeos/lock_screen_apps/note_taking_browsertest.cc:187:3
    #24 0x55c4ac3a916b in content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() ./../../content/public/test/browser_test_base.cc:422:5
    #25 0x55c4aaa428d5 in Run ./../../base/callback.h:129:12
    #26 0x55c4aaa428d5 in ChromeBrowserMainParts::PreMainMessageLoopRunImpl() ./../../chrome/browser/chrome_browser_main.cc:1844:0


Project Member

Comment 8 by bugdroid1@chromium.org, Nov 1

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/47ef5d6ff8b4195097ee5848efd4c861c0f9473b

commit 47ef5d6ff8b4195097ee5848efd4c861c0f9473b
Author: James Cook <jamescook@chromium.org>
Date: Thu Nov 01 15:37:34 2018

Revert "Let ash provide window show state if client has SHOW_STATE_DEFAULT"

This reverts commit 76f7d242a2e9cabdb0b2da856933093c1d461ac2.

Reason for revert: Failing LockScreenNoteTakingTest.Launch on
MSan bot, see  crbug.com/899055 

Original change's description:
> Let ash provide window show state if client has SHOW_STATE_DEFAULT
> 
> For lock screen app windows the window manager needs to specify the
> initial show state of the window. Ensure the client (chrome) does not
> overwrite the aura window show-state property in ash if the client
> window has ui::SHOW_STATE_DEFAULT.
> 
> Fixes LockScreenNoteTakingTest.Launch pass under SingleProcessMash
> 
> Bug:  899055 
> Test: added to views_mus_unittests
> 
> Change-Id: Ib7b6f9a060835ebf3e017737e4b98387a31831c8
> Reviewed-on: https://chromium-review.googlesource.com/c/1303273
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: Toni Baržić <tbarzic@chromium.org>
> Reviewed-by: Tom Sepez <tsepez@chromium.org>
> Commit-Queue: James Cook <jamescook@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#604517}

TBR=jamescook@chromium.org,tbarzic@chromium.org,sky@chromium.org,tsepez@chromium.org

Change-Id: I809656b611b297daf7c1bacb5ec620a94ee3f235
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  899055 
Reviewed-on: https://chromium-review.googlesource.com/c/1312931
Reviewed-by: James Cook <jamescook@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604591}
[modify] https://crrev.com/47ef5d6ff8b4195097ee5848efd4c861c0f9473b/chrome/browser/chromeos/lock_screen_apps/note_taking_browsertest.cc
[modify] https://crrev.com/47ef5d6ff8b4195097ee5848efd4c861c0f9473b/chrome/browser/chromeos/lock_screen_apps/state_controller.h
[modify] https://crrev.com/47ef5d6ff8b4195097ee5848efd4c861c0f9473b/chrome/test/data/extensions/lock_screen_apps/app_launch/test.js
[modify] https://crrev.com/47ef5d6ff8b4195097ee5848efd4c861c0f9473b/services/ws/test_ws/test_window_service.cc
[modify] https://crrev.com/47ef5d6ff8b4195097ee5848efd4c861c0f9473b/services/ws/test_ws/test_window_service.h
[modify] https://crrev.com/47ef5d6ff8b4195097ee5848efd4c861c0f9473b/services/ws/test_ws/test_ws.mojom
[modify] https://crrev.com/47ef5d6ff8b4195097ee5848efd4c861c0f9473b/testing/buildbot/filters/chromeos.mash.fyi.browser_tests.filter
[modify] https://crrev.com/47ef5d6ff8b4195097ee5848efd4c861c0f9473b/testing/buildbot/filters/chromeos.single_process_mash.browser_tests.filter
[modify] https://crrev.com/47ef5d6ff8b4195097ee5848efd4c861c0f9473b/ui/base/class_property.cc
[modify] https://crrev.com/47ef5d6ff8b4195097ee5848efd4c861c0f9473b/ui/views/mus/BUILD.gn
[modify] https://crrev.com/47ef5d6ff8b4195097ee5848efd4c861c0f9473b/ui/views/mus/desktop_window_tree_host_mus.cc
[modify] https://crrev.com/47ef5d6ff8b4195097ee5848efd4c861c0f9473b/ui/views/mus/desktop_window_tree_host_mus_unittest.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Nov 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/eb602d26a10d42002d1701952684aef404c1c1ba

commit eb602d26a10d42002d1701952684aef404c1c1ba
Author: James Cook <jamescook@chromium.org>
Date: Sat Nov 03 00:39:11 2018

Reland: Let ash provide window show state if client has SHOW_STATE_DEFAULT

For lock screen app windows the window manager needs to specify the
initial show state of the window. Ensure the client (chrome) does not
overwrite the aura window show-state property in ash if the client
window has ui::SHOW_STATE_DEFAULT.

Fixes LockScreenNoteTakingTest.Launch pass under SingleProcessMash

The reland changes FirstAppRunToastManager to use a WidgetObserver
to watch for app window bounds changes. Mash tears down aura::Windows
similarly to aura on MS Windows and Linux. The aura::Window for
the app window can be destroyed before AppWindowRegistry notifies
StateController and FirstAppRunToastManager that the app has been
closed, so it's not safe for FirstAppRunToastManager::Reset() to
manipulate the aura::Window to remove the ScopedObserver. See bug.

TBR=sky@chromium.org
TBR=tsepez@chromium.org

Bug:  899055 
Test: added to views_mus_unittests
Change-Id: I886dbe45fe53708beb4441c1d9da2587a2352997
Reviewed-on: https://chromium-review.googlesource.com/c/1312972
Reviewed-by: James Cook <jamescook@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Toni Baržić <tbarzic@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605110}
[modify] https://crrev.com/eb602d26a10d42002d1701952684aef404c1c1ba/chrome/browser/chromeos/lock_screen_apps/first_app_run_toast_manager.cc
[modify] https://crrev.com/eb602d26a10d42002d1701952684aef404c1c1ba/chrome/browser/chromeos/lock_screen_apps/first_app_run_toast_manager.h
[modify] https://crrev.com/eb602d26a10d42002d1701952684aef404c1c1ba/chrome/browser/chromeos/lock_screen_apps/note_taking_browsertest.cc
[modify] https://crrev.com/eb602d26a10d42002d1701952684aef404c1c1ba/chrome/browser/chromeos/lock_screen_apps/state_controller.h
[modify] https://crrev.com/eb602d26a10d42002d1701952684aef404c1c1ba/chrome/test/data/extensions/lock_screen_apps/app_launch/test.js
[modify] https://crrev.com/eb602d26a10d42002d1701952684aef404c1c1ba/services/ws/test_ws/test_window_service.cc
[modify] https://crrev.com/eb602d26a10d42002d1701952684aef404c1c1ba/services/ws/test_ws/test_window_service.h
[modify] https://crrev.com/eb602d26a10d42002d1701952684aef404c1c1ba/services/ws/test_ws/test_ws.mojom
[modify] https://crrev.com/eb602d26a10d42002d1701952684aef404c1c1ba/testing/buildbot/filters/chromeos.mash.fyi.browser_tests.filter
[modify] https://crrev.com/eb602d26a10d42002d1701952684aef404c1c1ba/testing/buildbot/filters/chromeos.single_process_mash.browser_tests.filter
[modify] https://crrev.com/eb602d26a10d42002d1701952684aef404c1c1ba/ui/base/class_property.cc
[modify] https://crrev.com/eb602d26a10d42002d1701952684aef404c1c1ba/ui/views/mus/BUILD.gn
[modify] https://crrev.com/eb602d26a10d42002d1701952684aef404c1c1ba/ui/views/mus/desktop_window_tree_host_mus.cc
[modify] https://crrev.com/eb602d26a10d42002d1701952684aef404c1c1ba/ui/views/mus/desktop_window_tree_host_mus_unittest.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Nov 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/50efb07037ee20bafe268fde806eb9492eb8170b

commit 50efb07037ee20bafe268fde806eb9492eb8170b
Author: James Cook <jamescook@chromium.org>
Date: Thu Nov 08 20:05:11 2018

Create lock screen app widgets maximized by default

Ash will end up maximizing the windows when they are added to the
lock screen container. Creating the widget maximized avoids some
back-and-forth with the window manager under mash. It also simplifies
testing.

Bug:  899055 
Test: browser_tests
Change-Id: I168ba67c1cc7c680cd0c9a4b4a1b22c3c40bd500
Reviewed-on: https://chromium-review.googlesource.com/c/1316438
Commit-Queue: James Cook <jamescook@chromium.org>
Reviewed-by: Toni Baržić <tbarzic@chromium.org>
Reviewed-by: Michael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606577}
[modify] https://crrev.com/50efb07037ee20bafe268fde806eb9492eb8170b/chrome/browser/chromeos/lock_screen_apps/note_taking_browsertest.cc
[modify] https://crrev.com/50efb07037ee20bafe268fde806eb9492eb8170b/chrome/browser/chromeos/lock_screen_apps/state_controller.h
[modify] https://crrev.com/50efb07037ee20bafe268fde806eb9492eb8170b/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura_ash.cc
[modify] https://crrev.com/50efb07037ee20bafe268fde806eb9492eb8170b/chrome/test/data/extensions/lock_screen_apps/app_launch/test.js

Status: Fixed (was: Started)

Sign in to add a comment