Fix naming and formatting
This commit is contained in:
parent
791486433d
commit
25015c4c63
3 changed files with 6 additions and 9 deletions
|
@ -207,7 +207,7 @@ void WebContentsPreferences::AppendExtraCommandLineSwitches(
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WebContentsPreferences::IsPreferenceEnabled(
|
bool WebContentsPreferences::IsPreferenceEnabled(
|
||||||
const std::string& attributeName,
|
const std::string& attribute_name,
|
||||||
content::WebContents* web_contents) {
|
content::WebContents* web_contents) {
|
||||||
WebContentsPreferences* self;
|
WebContentsPreferences* self;
|
||||||
if (!web_contents)
|
if (!web_contents)
|
||||||
|
@ -218,9 +218,9 @@ bool WebContentsPreferences::IsPreferenceEnabled(
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
base::DictionaryValue& web_preferences = self->web_preferences_;
|
base::DictionaryValue& web_preferences = self->web_preferences_;
|
||||||
bool boolValue = false;
|
bool bool_value = false;
|
||||||
web_preferences.GetBoolean(attributeName, &boolValue);
|
web_preferences.GetBoolean(attribute_name, &bool_value);
|
||||||
return boolValue;
|
return bool_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WebContentsPreferences::IsSandboxed(content::WebContents* web_contents) {
|
bool WebContentsPreferences::IsSandboxed(content::WebContents* web_contents) {
|
||||||
|
|
|
@ -37,7 +37,7 @@ class WebContentsPreferences
|
||||||
static void AppendExtraCommandLineSwitches(
|
static void AppendExtraCommandLineSwitches(
|
||||||
content::WebContents* web_contents, base::CommandLine* command_line);
|
content::WebContents* web_contents, base::CommandLine* command_line);
|
||||||
|
|
||||||
static bool IsPreferenceEnabled(const std::string& attributeName,
|
static bool IsPreferenceEnabled(const std::string& attribute_name,
|
||||||
content::WebContents* web_contents);
|
content::WebContents* web_contents);
|
||||||
static bool IsSandboxed(content::WebContents* web_contents);
|
static bool IsSandboxed(content::WebContents* web_contents);
|
||||||
static bool UsesNativeWindowOpen(content::WebContents* web_contents);
|
static bool UsesNativeWindowOpen(content::WebContents* web_contents);
|
||||||
|
|
|
@ -1048,10 +1048,7 @@ describe('chromium feature', function () {
|
||||||
it('should download a pdf when plugins are disabled', function (done) {
|
it('should download a pdf when plugins are disabled', function (done) {
|
||||||
createBrowserWindow(false)
|
createBrowserWindow(false)
|
||||||
ipcRenderer.sendSync('set-download-option', false, false)
|
ipcRenderer.sendSync('set-download-option', false, false)
|
||||||
ipcRenderer.once('download-done', function (event, state, url,
|
ipcRenderer.once('download-done', function (event, state, url, mimeType, receivedBytes, totalBytes, disposition, filename) {
|
||||||
mimeType, receivedBytes,
|
|
||||||
totalBytes, disposition,
|
|
||||||
filename) {
|
|
||||||
assert.equal(state, 'completed')
|
assert.equal(state, 'completed')
|
||||||
assert.equal(filename, 'cat.pdf')
|
assert.equal(filename, 'cat.pdf')
|
||||||
assert.equal(mimeType, 'application/pdf')
|
assert.equal(mimeType, 'application/pdf')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue