1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 from telemetry.core.backends import form_based_credentials_backend
7 class FacebookCredentialsBackend(
8 form_based_credentials_backend.FormBasedCredentialsBackend):
9 def IsAlreadyLoggedIn(self, tab):
10 return tab.EvaluateJavaScript(
11 'document.getElementById("fbNotificationsList")!== null || '
12 'document.getElementById("m_home_notice")!== null')
15 def credentials_type(self):
20 return 'http://www.facebook.com/'
23 def login_form_id(self):
27 def login_input_id(self):
31 def password_input_id(self):