content: Fix destruction of BrowserTaskExecutor in BrowserMainLoopTest

The call to BrowserTaskExecutor::ResetForTesting() happens too early:
ShutdownThreadsAndCleanUp will require it to be present once we replace
BrowserThread::PostTask with base::PostTaskWithTraits.

Bug: 878356
Change-Id: I7b2913288705107b509655c0a0cdb43374eb0157
Reviewed-on: https://chromium-review.googlesource.com/1227993
Commit-Queue: Eric Seckler <[email protected]>
Reviewed-by: Alex Clarke <[email protected]>
Reviewed-by: Gabriel Charette <[email protected]>
Cr-Commit-Position: refs/heads/master@{#591822}
diff --git a/content/browser/browser_main_loop_unittest.cc b/content/browser/browser_main_loop_unittest.cc
index 1dc321b..14821a5 100644
--- a/content/browser/browser_main_loop_unittest.cc
+++ b/content/browser/browser_main_loop_unittest.cc
@@ -37,9 +37,9 @@
                   ->GetMaxConcurrentNonBlockedTasksWithTraitsDeprecated(
                       {base::TaskPriority::USER_VISIBLE}),
               base::SysInfo::NumberOfProcessors() - 1);
-    BrowserTaskExecutor::ResetForTesting();
     browser_main_loop.ShutdownThreadsAndCleanUp();
   }
+  BrowserTaskExecutor::ResetForTesting();
   for (int id = BrowserThread::UI; id < BrowserThread::ID_COUNT; ++id) {
     BrowserThreadImpl::ResetGlobalsForTesting(
         static_cast<BrowserThread::ID>(id));